home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / williams.c < prev    next >
Text File  |  2000-04-04  |  86KB  |  2,547 lines

  1. /*
  2.  
  3.     Ordering:
  4.  
  5.         * Defender
  6.         * Defense Command
  7.         * Mayday Mai'dez
  8.         * Colony 7
  9.  
  10.         * Stargate
  11.         * Robotron
  12.         * Joust
  13.         * Bubbles
  14.         * Splat
  15.         * Sinistar
  16.  
  17.         * Blaster
  18.  
  19.         * Mystic Marathon
  20.         * Turkey Shoot
  21.         * Inferno
  22.         * Joust 2
  23.  
  24. */
  25.  
  26.  
  27. /***************************************************************************
  28.  
  29. Changes:
  30.     Mar 12 98 LBO
  31.     * Added Sinistar speech samples provided by Howie Cohen
  32.     * Fixed clipping circuit with help from Sean Riddle and Pat Lawrence
  33.  
  34.     Mar 22 98 ASG
  35.     * Fixed Sinistar head drawing, did another major cleanup
  36.     * Rewrote the blitter routines
  37.     * Fixed interrupt timing finally!!!
  38.  
  39. Note: the visible area (according to the service mode) seems to be
  40.     { 6, 297-1, 7, 246-1 },
  41. however I use
  42.     { 6, 298-1, 7, 247-1 },
  43. because the DOS port doesn't support well screen widths which are not multiple of 4.
  44.  
  45. ------- Blaster Bubbles Joust Robotron Sinistar Splat Stargate -------------
  46.  
  47. 0000-8FFF ROM   (for Blaster, 0000-3FFF is a bank of 12 ROMs)
  48. 0000-97FF Video  RAM Bank switched with ROM (96FF for Blaster)
  49. 9800-BFFF RAM
  50.     0xBB00 Blaster only, Color 0 for each line (256 entry)
  51.     0xBC00 Blaster only, Color 0 flags, latch color only if bit 0 = 1 (256 entry)
  52.         Do something else with the bit 1, I do not know what
  53. C000-CFFF I/O
  54. D000-FFFF ROM
  55.  
  56. c000-C00F color_registers  (16 bytes of BBGGGRRR)
  57.  
  58. c804 widget_pia_dataa (widget = I/O board)
  59. c805 widget_pia_ctrla
  60. c806 widget_pia_datab
  61. c807 widget_pia_ctrlb (CB2 select between player 1 and player 2
  62.                controls if Table or Joust)
  63.       bits 5-3 = 110 = player 2
  64.       bits 5-3 = 111 = player 1
  65.  
  66. c80c rom_pia_dataa
  67. c80d rom_pia_ctrla
  68. c80e rom_pia_datab
  69.       bit 0 \
  70.       bit 1 |
  71.       bit 2 |-6 bits to sound board
  72.       bit 3 |
  73.       bit 4 |
  74.       bit 5 /
  75.       bit 6 \
  76.       bit 7 /Plus CA2 and CB2 = 4 bits to drive the LED 7 segment
  77. c80f rom_pia_ctrlb
  78.  
  79. C900 rom_enable_scr_ctrl  Switch between video ram and rom at 0000-97FF
  80.  
  81. C940 Blaster only: Select bank in the color Prom for color remap
  82. C980 Blaster only: Select which ROM is at 0000-3FFF
  83. C9C0 Blaster only: bit 0 = enable the color 0 changing each lines
  84.            bit 1 = erase back each frame
  85.  
  86.  
  87. ***** Blitter ****** (Stargate and Defender do not have blitter)
  88. CA00 start_blitter    Each bits has a function
  89.       1000 0000 Do not process half the byte 4-7
  90.       0100 0000 Do not process half the byte 0-3
  91.       0010 0000 Shift the shape one pixel right (to display a shape on an odd pixel)
  92.       0001 0000 Remap, if shape != 0 then pixel = mask
  93.       0000 1000 Source  1 = take source 0 = take Mask only
  94.       0000 0100 ?
  95.       0000 0010 Transparent
  96.       0000 0001
  97. CA01 blitter_mask     Not really a mask, more a remap color, see Blitter
  98. CA02 blitter_source   hi
  99. CA03 blitter_source   lo
  100. CA04 blitter_dest     hi
  101. CA05 blitter_dest     lo
  102. CA06 blitter_w_h      H  Do a XOR with 4 to have the real value (Except Splat)
  103. CA07 blitter_w_h      W  Do a XOR with 4 to have the real value (Except Splat)
  104.  
  105. CB00 6 bits of the video counters bits 2-7
  106.  
  107. CBFF watchdog
  108.  
  109. CC00-CFFF 1K X 4 CMOS ram battery backed up (8 bits on Sinistar)
  110.  
  111.  
  112.  
  113.  
  114. ------------------ Robotron -------------------
  115. c804 widget_pia_dataa (widget = I/O board)
  116.   bit 0  Move Up
  117.   bit 1  Move Down
  118.   bit 2  Move Left
  119.   bit 3  Move Right
  120.   bit 4  1 Player
  121.   bit 5  2 Players
  122.   bit 6  Fire Up
  123.   bit 7  Fire Down
  124.  
  125. c806 widget_pia_datab
  126.   bit 0  Fire Left
  127.   bit 1  Fire Right
  128.   bit 2
  129.   bit 3
  130.   bit 4
  131.   bit 5
  132.   bit 6
  133.   bit 7
  134.  
  135. c80c rom_pia_dataa
  136.   bit 0  Auto Up
  137.   bit 1  Advance
  138.   bit 2  Right Coin
  139.   bit 3  High Score Reset
  140.   bit 4  Left Coin
  141.   bit 5  Center Coin
  142.   bit 6  Slam Door Tilt
  143.   bit 7  Hand Shake from sound board
  144.  
  145.  
  146. ------------------ Joust -------------------
  147. c804 widget_pia_dataa (widget = I/O board)
  148.   bit 0  Move Left   player 1/2
  149.   bit 1  Move Right  player 1/2
  150.   bit 2  Flap        player 1/2
  151.   bit 3
  152.   bit 4  2 Player
  153.   bit 5  1 Players
  154.   bit 6
  155.   bit 7
  156.  
  157. c806 widget_pia_datab
  158.   bit 0
  159.   bit 1
  160.   bit 2
  161.   bit 3
  162.   bit 4
  163.   bit 5
  164.   bit 6
  165.   bit 7
  166.  
  167. c80c rom_pia_dataa
  168.   bit 0  Auto Up
  169.   bit 1  Advance
  170.   bit 2  Right Coin
  171.   bit 3  High Score Reset
  172.   bit 4  Left Coin
  173.   bit 5  Center Coin
  174.   bit 6  Slam Door Tilt
  175.   bit 7  Hand Shake from sound board
  176.  
  177.  
  178. ------------------ Stargate -------------------
  179. c804 widget_pia_dataa (widget = I/O board)
  180.   bit 0  Fire
  181.   bit 1  Thrust
  182.   bit 2  Smart Bomb
  183.   bit 3  HyperSpace
  184.   bit 4  2 Players
  185.   bit 5  1 Player
  186.   bit 6  Reverse
  187.   bit 7  Down
  188.  
  189. c806 widget_pia_datab
  190.   bit 0  Up
  191.   bit 1  Inviso
  192.   bit 2
  193.   bit 3
  194.   bit 4
  195.   bit 5
  196.   bit 6
  197.   bit 7  0 = Upright  1 = Table
  198.  
  199. c80c rom_pia_dataa
  200.   bit 0  Auto Up
  201.   bit 1  Advance
  202.   bit 2  Right Coin        (High Score Reset in schematics)
  203.   bit 3  High Score Reset  (Left Coin in schematics)
  204.   bit 4  Left Coin         (Center Coin in schematics)
  205.   bit 5  Center Coin       (Right Coin in schematics)
  206.   bit 6  Slam Door Tilt
  207.   bit 7  Hand Shake from sound board
  208.  
  209.  
  210. ------------------ Splat -------------------
  211. c804 widget_pia_dataa (widget = I/O board)
  212.   bit 0  Walk Up
  213.   bit 1  Walk Down
  214.   bit 2  Walk Left
  215.   bit 3  Walk Right
  216.   bit 4  1 Player
  217.   bit 5  2 Players
  218.   bit 6  Throw Up
  219.   bit 7  Throw Down
  220.  
  221. c806 widget_pia_datab
  222.   bit 0  Throw Left
  223.   bit 1  Throw Right
  224.   bit 2
  225.   bit 3
  226.   bit 4
  227.   bit 5
  228.   bit 6
  229.   bit 7
  230.  
  231. c80c rom_pia_dataa
  232.   bit 0  Auto Up
  233.   bit 1  Advance
  234.   bit 2  Right Coin
  235.   bit 3  High Score Reset
  236.   bit 4  Left Coin
  237.   bit 5  Center Coin
  238.   bit 6  Slam Door Tilt
  239.   bit 7  Hand Shake from sound board
  240.  
  241.  
  242. ------------------ Blaster -------------------
  243. c804 widget_pia_dataa (widget = I/O board)
  244.   bit 0  up/down switch a
  245.   bit 1  up/down switch b
  246.   bit 2  up/down switch c
  247.   bit 3  up/down direction
  248.   bit 4  left/right switch a
  249.   bit 5  left/right switch b
  250.   bit 6  left/right switch c
  251.   bit 7  left/right direction
  252.  
  253. c806 widget_pia_datab
  254.   bit 0  Thrust (Panel)
  255.   bit 1  Blast
  256.   bit 2  Thrust (Joystick)
  257.   bit 3
  258.   bit 4  1 Player
  259.   bit 5  2 Player
  260.   bit 6
  261.   bit 7
  262.  
  263. c80c rom_pia_dataa
  264.   bit 0  Auto Up
  265.   bit 1  Advance
  266.   bit 2  Right Coin
  267.   bit 3  High Score Reset
  268.   bit 4  Left Coin
  269.   bit 5  Center Coin
  270.   bit 6  Slam Door Tilt
  271.   bit 7  Hand Shake from sound board
  272.  
  273. ------------------------- Sinistar -------------------------------------
  274. c804 widget_pia_dataa (widget = I/O board)
  275.   bit 0  up/down switch a
  276.   bit 1  up/down switch b
  277.   bit 2  up/down switch c
  278.   bit 3  up/down direction
  279.   bit 4  left/right switch a
  280.   bit 5  left/right switch b
  281.   bit 6  left/right switch c
  282.   bit 7  left/right direction
  283.  
  284. c806 widget_pia_datab
  285.   bit 0  Fire
  286.   bit 1  Bomb
  287.   bit 2
  288.   bit 3
  289.   bit 4  1 Player
  290.   bit 5  2 Player
  291.   bit 6
  292.   bit 7
  293.  
  294. c80c rom_pia_dataa
  295.   bit 0  Auto Up
  296.   bit 1  Advance
  297.   bit 2  Right Coin
  298.   bit 3  High Score Reset
  299.   bit 4  Left Coin
  300.   bit 5  Center Coin
  301.   bit 6  Slam Door Tilt
  302.   bit 7  Hand Shake from sound board
  303.  
  304.  
  305. ------------------ Bubbles -------------------
  306. c804 widget_pia_dataa (widget = I/O board)
  307.   bit 0  Up
  308.   bit 1  Down
  309.   bit 2  Left
  310.   bit 3  Right
  311.   bit 4  2 Players
  312.   bit 5  1 Player
  313.   bit 6
  314.   bit 7
  315.  
  316. c806 widget_pia_datab
  317.   bit 0
  318.   bit 1
  319.   bit 2
  320.   bit 3
  321.   bit 4
  322.   bit 5
  323.   bit 6
  324.   bit 7
  325.  
  326. c80c rom_pia_dataa
  327.   bit 0  Auto Up
  328.   bit 1  Advance
  329.   bit 2  Right Coin        (High Score Reset in schematics)
  330.   bit 3  High Score Reset  (Left Coin in schematics)
  331.   bit 4  Left Coin         (Center Coin in schematics)
  332.   bit 5  Center Coin       (Right Coin in schematics)
  333.   bit 6  Slam Door Tilt
  334.   bit 7  Hand Shake from sound board
  335.  
  336. ------------------------- Defender -------------------------------------
  337. 0000-9800 Video RAM
  338. C000-CFFF ROM (4 banks) + I/O
  339. d000-ffff ROM
  340.  
  341. c000-c00f color_registers  (16 bytes of BBGGGRRR)
  342.  
  343. C3FC      WatchDog
  344.  
  345. C400-C4FF CMOS ram battery backed up
  346.  
  347. C800      6 bits of the video counters bits 2-7
  348.  
  349. cc00 pia1_dataa (widget = I/O board)
  350.   bit 0  Auto Up
  351.   bit 1  Advance
  352.   bit 2  Right Coin
  353.   bit 3  High Score Reset
  354.   bit 4  Left Coin
  355.   bit 5  Center Coin
  356.   bit 6
  357.   bit 7
  358. cc01 pia1_ctrla
  359.  
  360. cc02 pia1_datab
  361.   bit 0 \
  362.   bit 1 |
  363.   bit 2 |-6 bits to sound board
  364.   bit 3 |
  365.   bit 4 |
  366.   bit 5 /
  367.   bit 6 \
  368.   bit 7 /Plus CA2 and CB2 = 4 bits to drive the LED 7 segment
  369. cc03 pia1_ctrlb (CB2 select between player 1 and player 2 controls if Table)
  370.  
  371. cc04 pia2_dataa
  372.   bit 0  Fire
  373.   bit 1  Thrust
  374.   bit 2  Smart Bomb
  375.   bit 3  HyperSpace
  376.   bit 4  2 Players
  377.   bit 5  1 Player
  378.   bit 6  Reverse
  379.   bit 7  Down
  380. cc05 pia2_ctrla
  381.  
  382. cc06 pia2_datab
  383.   bit 0  Up
  384.   bit 1
  385.   bit 2
  386.   bit 3
  387.   bit 4
  388.   bit 5
  389.   bit 6
  390.   bit 7
  391. cc07 pia2_ctrlb
  392.   Control the IRQ
  393.  
  394. d000 Select bank (c000-cfff)
  395.   0 = I/O
  396.   1 = BANK 1
  397.   2 = BANK 2
  398.   3 = BANK 3
  399.   7 = BANK 4
  400.  
  401. ------------------------------------------------------------------------
  402.  
  403. Mystic Marathon (1983)
  404. Turkey Shoot (1984)
  405. Inferno (1984)
  406. Joust2 Survival of the Fittest (1986)
  407.  
  408. All have two boards, a large board with lots of RAM and
  409. three ROMs, and a smaller board with lots of ROMs,
  410. the CPU, the 6821 PIAs, and the two "Special Chip 2"
  411. custom BIT/BLT chips.
  412. Joust 2 has an additional music/speech board that has a
  413. 68B09E CPU, 68B21 PIA, Harris 55564-5 CVSD, and a YM2151.
  414.  
  415. Contact Michael Soderstrom (ichael@geocities.com) if you
  416. have any additional information or corrections.
  417.  
  418. Memory Map:
  419.  
  420. 15 14 13 12  11 10  9  8   7  6  5  4   3  2  1  0
  421. --------------------------------------------------
  422.  x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x    0000-BFFF    48K DRAM
  423.  
  424.  0  0  0  x   x  x  x  x   x  x  x  x   x  x  x  x    0000-1FFF    8K ROM
  425.  0  0  1  x   x  x  x  x   x  x  x  x   x  x  x  x    2000-3FFF    8K ROM
  426.  0  1  0  x   x  x  x  x   x  x  x  x   x  x  x  x    4000-5FFF    8K ROM
  427.  0  1  1  x   x  x  x  x   x  x  x  x   x  x  x  x    6000-7FFF    8K ROM
  428.  
  429.  1  0  0  0   x  x  x  x   x  x  x  x   x  x  x  x    8000-8FFF    EN_COLOR* (PAGE3 only)
  430.  
  431.  0  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x    0000-7FFF    OE_DRAM* (PAGE0 and read only) or:
  432.  1  0  x  x   x  x  x  x   x  x  x  x   x  x  x  x    9000-BFFF    OE_DRAM* (!EN COLOR and read only)
  433.  
  434.  1  1  0  0   x  x  x  x   x  x  x  x   x  x  x  x    C000-CFFF    I/O:
  435.  1  1  0  0   0  x  x  x   x  x  x  x   x  x  x  x    C000-C7FF    MAP_EN*
  436.  1  1  0  0   1  0  0  0   0  x  x  x   x  x  x  x    C800-C87F    CS_PAGE
  437.  1  1  0  0   1  0  0  0   1  x  x  x   x  x  x  x    C880-C87F    CS_INT* (blitter)
  438.  1  1  0  0   1  0  0  1   0  x  x  x   x  x  x  x    C900-C97F    CS_WDOG* (data = 0x14)
  439.  1  1  0  0   1  0  0  1   1  x  x  x   x  x  x  x    C980-C9FF    CS_PIA
  440.  1  1  0  0   1  0  0  1   1  x  x  x   0  0  x  x    C980-C983    PIA IC5
  441.  1  1  0  0   1  0  0  1   1  x  x  x   0  1  x  x    C984-C987    PIA IC6
  442.  1  1  0  0   1  0  0  1   1  x  x  x   1  1  x  x    C98C        7 segment LED
  443.  
  444.  1  1  0  0   1  0  1  1   0  0  0  x   x  x  x  x    CB00-CB1F    CK_FG
  445.  1  1  0  0   1  0  1  1   0  0  1  x   x  x  x  x    CB20-CB3F    CK_BG
  446.  1  1  0  0   1  0  1  1   0  1  0  x   x  x  x  x    CB40-CB5F    CK_SCL
  447.  1  1  0  0   1  0  1  1   0  1  1  x   x  x  x  x    CB60-CB7F    CK_SCH
  448.  1  1  0  0   1  0  1  1   1  0  0  x   x  x  x  x    CB80-CB9F    FLIP clk
  449.  1  1  0  0   1  0  1  1   1  0  1  x   x  x  x  x    CBA0-CBBF    DMA_WRINH clk
  450.  
  451.  1  1  0  0   1  0  1  1   1  1  1  0   x  x  x  x    CBE0-CBEF    EN VPOS*
  452.  
  453.  1  1  0  0   1  1  0  0   x  x  x  x   x  x  x  x    CC00-CCFF    1Kx4 CMOS RAM MEM_PROT protected
  454.  1  1  0  0   1  1  x  x   x  x  x  x   x  x  x  x    CD00-CFFF              not MEM_PROT protected
  455.  
  456.  Mystic Marathon/Inferno:
  457.  1  1  0  1   0  x  x  x   x  x  x  x   x  x  x  x    D000-D7FF    SRAM0*
  458.  1  1  0  1   1  x  x  x   x  x  x  x   x  x  x  x    D800-DFFF    SRAM1*
  459.  1  1  1  0   x  x  x  x   x  x  x  x   x  x  x  x    E000-EFFF    EXXX* 4K ROM
  460.  1  1  1  1   x  x  x  x   x  x  x  x   x  x  x  x    F000-FFFF    FXXX* 4K ROM
  461.  
  462.  Turkey Shoot/Joust2:
  463.  1  1  0  1   x  x  x  x   x  x  x  x   x  x  x  x    D000-DFFF    DXXX* 4K ROM
  464.  1  1  1  0   x  x  x  x   x  x  x  x   x  x  x  x    E000-EFFF    EXXX* 4K ROM
  465.  1  1  1  1   x  x  x  x   x  x  x  x   x  x  x  x    F000-FFFF    FXXX* 4K ROM
  466.  
  467. 6802/6808 Sound
  468.  
  469.  0  0  0  x   x  x  x  x   0  x  x  x   x  x  x  x    0000-007F    128 bytes RAM
  470.  0  0  1  x   x  x  x  x   x  x  x  x   x  x  x  x    2000-3FFF    CS PIA IC4
  471.  1  1  1  x   x  x  x  x   x  x  x  x   x  x  x  x    E000-FFFF    8K ROM
  472.  
  473. ***************************************************************************/
  474.  
  475. #include "driver.h"
  476. #include "machine/6821pia.h"
  477. #include "sndhrdw/williams.h"
  478. #include "vidhrdw/generic.h"
  479.  
  480.  
  481. /**** local stuff ****/
  482.  
  483. static UINT16 cmos_base;
  484. static UINT16 cmos_length;
  485.  
  486.  
  487.  
  488. /**** from machine/williams.h ****/
  489.  
  490. /* Generic old-Williams PIA interfaces */
  491. extern struct pia6821_interface williams_pia_0_intf;
  492. extern struct pia6821_interface williams_muxed_pia_0_intf;
  493. extern struct pia6821_interface williams_dual_muxed_pia_0_intf;
  494. extern struct pia6821_interface williams_49way_pia_0_intf;
  495. extern struct pia6821_interface williams_pia_1_intf;
  496. extern struct pia6821_interface williams_snd_pia_intf;
  497.  
  498. /* Game-specific old-Williams PIA interfaces */
  499. extern struct pia6821_interface defender_pia_0_intf;
  500. extern struct pia6821_interface stargate_pia_0_intf;
  501. extern struct pia6821_interface sinistar_snd_pia_intf;
  502.  
  503. /* Generic later-Williams PIA interfaces */
  504. extern struct pia6821_interface williams2_muxed_pia_0_intf;
  505. extern struct pia6821_interface williams2_pia_1_intf;
  506. extern struct pia6821_interface williams2_snd_pia_intf;
  507.  
  508. /* Game-specific later-Williams PIA interfaces */
  509. extern struct pia6821_interface mysticm_pia_0_intf;
  510. extern struct pia6821_interface tshoot_pia_0_intf;
  511. extern struct pia6821_interface tshoot_snd_pia_intf;
  512. extern struct pia6821_interface joust2_pia_1_intf;
  513.  
  514. /* banking variables */
  515. extern UINT8 *defender_bank_base;
  516. extern const UINT32 *defender_bank_list;
  517. extern UINT8 *williams_bank_base;
  518.  
  519. /* initialization */
  520. void defender_init_machine(void);
  521. void williams_init_machine(void);
  522. void williams2_init_machine(void);
  523. void joust2_init_machine(void);
  524.  
  525. /* banking */
  526. WRITE_HANDLER( williams_vram_select_w );
  527. WRITE_HANDLER( defender_bank_select_w );
  528. WRITE_HANDLER( blaster_bank_select_w );
  529. WRITE_HANDLER( blaster_vram_select_w );
  530. WRITE_HANDLER( williams2_bank_select_w );
  531.  
  532. /* misc */
  533. WRITE_HANDLER( williams2_7segment_w );
  534.  
  535. /* Mayday protection */
  536. extern UINT8 *mayday_protection;
  537. READ_HANDLER( mayday_protection_r );
  538.  
  539.  
  540.  
  541. /**** from vidhrdw/williams.h ****/
  542.  
  543. /* blitter variables */
  544. extern UINT8 *williams_blitterram;
  545. extern UINT8 williams_blitter_xor;
  546. extern UINT8 williams_blitter_remap;
  547. extern UINT8 williams_blitter_clip;
  548.  
  549. /* tilemap variables */
  550. extern UINT8 williams2_tilemap_mask;
  551. extern const UINT8 *williams2_row_to_palette;
  552. extern UINT8 williams2_M7_flip;
  553. extern INT8  williams2_videoshift;
  554. extern UINT8 williams2_special_bg_color;
  555.  
  556. /* later-Williams video control variables */
  557. extern UINT8 *williams2_blit_inhibit;
  558. extern UINT8 *williams2_xscroll_low;
  559. extern UINT8 *williams2_xscroll_high;
  560.  
  561. /* Blaster extra variables */
  562. extern UINT8 *blaster_color_zero_table;
  563. extern UINT8 *blaster_color_zero_flags;
  564. extern UINT8 *blaster_video_bits;
  565.  
  566.  
  567. WRITE_HANDLER( defender_videoram_w );
  568. WRITE_HANDLER( williams_videoram_w );
  569. WRITE_HANDLER( williams2_videoram_w );
  570. WRITE_HANDLER( williams_blitter_w );
  571. WRITE_HANDLER( blaster_remap_select_w );
  572. WRITE_HANDLER( blaster_video_bits_w );
  573. READ_HANDLER( williams_video_counter_r );
  574.  
  575.  
  576. int williams_vh_start(void);
  577. void williams_vh_stop(void);
  578. void williams_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  579.  
  580. int blaster_vh_start(void);
  581. void blaster_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  582.  
  583. int williams2_vh_start(void);
  584. void williams2_vh_stop(void);
  585.  
  586. WRITE_HANDLER( williams2_fg_select_w );
  587. WRITE_HANDLER( williams2_bg_select_w );
  588.  
  589.  
  590.  
  591. /**** configuration macros ****/
  592.  
  593. #define CONFIGURE_CMOS(a,l) \
  594.     cmos_base = a;\
  595.     cmos_length = l
  596.  
  597. #define CONFIGURE_BLITTER(x,r,c) \
  598.     williams_blitter_xor = x;\
  599.     williams_blitter_remap = r;\
  600.     williams_blitter_clip = c
  601.  
  602. #define CONFIGURE_TILEMAP(m,p,f,s,b) \
  603.     williams2_tilemap_mask = m;\
  604.     williams2_row_to_palette = p;\
  605.     williams2_M7_flip = (f) ? 0x80 : 0x00;\
  606.     williams2_videoshift = s;\
  607.     williams2_special_bg_color = b
  608.  
  609. #define CONFIGURE_PIAS(a,b,c) \
  610.     pia_unconfig();\
  611.     pia_config(0, PIA_STANDARD_ORDERING | PIA_8BIT, &a);\
  612.     pia_config(1, PIA_STANDARD_ORDERING | PIA_8BIT, &b);\
  613.     pia_config(2, PIA_STANDARD_ORDERING | PIA_8BIT, &c)
  614.  
  615.  
  616.  
  617. static void nvram_handler(void *file,int read_or_write)
  618. {
  619.     UINT8 *ram = memory_region(REGION_CPU1);
  620.  
  621.     if (read_or_write)
  622.         osd_fwrite(file,&ram[cmos_base],cmos_length);
  623.     else
  624.     {
  625.         if (file)
  626.             osd_fread(file,&ram[cmos_base],cmos_length);
  627.         else
  628.             memset(&ram[cmos_base],0,cmos_length);
  629.     }
  630. }
  631.  
  632.  
  633.  
  634. /*************************************
  635.  *
  636.  *    Defender memory handlers
  637.  *
  638.  *************************************/
  639.  
  640. static struct MemoryReadAddress defender_readmem[] =
  641. {
  642.     { 0x0000, 0x97ff, MRA_BANK1 },
  643.     { 0x9800, 0xbfff, MRA_RAM },
  644.     { 0xc000, 0xcfff, MRA_BANK2 },
  645.     { 0xd000, 0xffff, MRA_ROM },
  646.     { -1 }  /* end of table */
  647. };
  648.  
  649.  
  650. static struct MemoryWriteAddress defender_writemem[] =
  651. {
  652.     { 0x0000, 0x97ff, williams_videoram_w, &videoram, &videoram_size },
  653.     { 0x9800, 0xbfff, MWA_RAM },
  654.     { 0xc000, 0xcfff, MWA_BANK2, &defender_bank_base },
  655.     { 0xc000, 0xc00f, MWA_RAM, &paletteram },
  656.     { 0xd000, 0xdfff, defender_bank_select_w },
  657.     { 0xe000, 0xffff, MWA_ROM },
  658.     { -1 }  /* end of table */
  659. };
  660.  
  661.  
  662.  
  663. /*************************************
  664.  *
  665.  *    General Williams memory handlers
  666.  *
  667.  *************************************/
  668.  
  669. static struct MemoryReadAddress williams_readmem[] =
  670. {
  671.     { 0x0000, 0x97ff, MRA_BANK1 },
  672.     { 0x9800, 0xbfff, MRA_RAM },
  673.     { 0xc804, 0xc807, pia_0_r },
  674.     { 0xc80c, 0xc80f, pia_1_r },
  675.     { 0xcb00, 0xcb00, williams_video_counter_r },
  676.     { 0xcc00, 0xcfff, MRA_RAM },
  677.     { 0xd000, 0xffff, MRA_ROM },
  678.     { -1 }  /* end of table */
  679. };
  680.  
  681.  
  682. static struct MemoryWriteAddress williams_writemem[] =
  683. {
  684.     { 0x0000, 0x97ff, williams_videoram_w, &williams_bank_base, &videoram_size },
  685.     { 0x9800, 0xbfff, MWA_RAM },
  686.     { 0xc000, 0xc00f, paletteram_BBGGGRRR_w, &paletteram },
  687.     { 0xc804, 0xc807, pia_0_w },
  688.     { 0xc80c, 0xc80f, pia_1_w },
  689.     { 0xc900, 0xc900, williams_vram_select_w },
  690.     { 0xca00, 0xca07, williams_blitter_w, &williams_blitterram },
  691.     { 0xcbff, 0xcbff, watchdog_reset_w },
  692.     { 0xcc00, 0xcfff, MWA_RAM },
  693.     { 0xd000, 0xffff, MWA_ROM },
  694.     { -1 }  /* end of table */
  695. };
  696.  
  697.  
  698.  
  699. /*************************************
  700.  *
  701.  *    Blaster memory handlers
  702.  *
  703.  *************************************/
  704.  
  705. static struct MemoryReadAddress blaster_readmem[] =
  706. {
  707.     { 0x0000, 0x3fff, MRA_BANK1 },
  708.     { 0x4000, 0x96ff, MRA_BANK2 },
  709.     { 0x9700, 0xbfff, MRA_RAM },
  710.     { 0xc804, 0xc807, pia_0_r },
  711.     { 0xc80c, 0xc80f, pia_1_r },
  712.     { 0xcb00, 0xcb00, williams_video_counter_r },
  713.     { 0xcc00, 0xcfff, MRA_RAM },
  714.     { 0xd000, 0xffff, MRA_ROM },
  715.     { -1 }  /* end of table */
  716. };
  717.  
  718.  
  719. static struct MemoryWriteAddress blaster_writemem[] =
  720. {
  721.     { 0x0000, 0x96ff, williams_videoram_w, &williams_bank_base, &videoram_size },
  722.     { 0x9700, 0xbaff, MWA_RAM },
  723.     { 0xbb00, 0xbbff, MWA_RAM, &blaster_color_zero_table },
  724.     { 0xbc00, 0xbcff, MWA_RAM, &blaster_color_zero_flags },
  725.     { 0xbd00, 0xbfff, MWA_RAM },
  726.     { 0xc000, 0xc00f, paletteram_BBGGGRRR_w, &paletteram },
  727.     { 0xc804, 0xc807, pia_0_w },
  728.     { 0xc80c, 0xc80f, pia_1_w },
  729.     { 0xc900, 0xc900, blaster_vram_select_w },
  730.     { 0xc940, 0xc940, blaster_remap_select_w },
  731.     { 0xc980, 0xc980, blaster_bank_select_w },
  732.     { 0xc9C0, 0xc9c0, blaster_video_bits_w, &blaster_video_bits },
  733.     { 0xca00, 0xca07, williams_blitter_w, &williams_blitterram },
  734.     { 0xcbff, 0xcbff, watchdog_reset_w },
  735.     { 0xcc00, 0xcfff, MWA_RAM },
  736.     { 0xd000, 0xffff, MWA_ROM },
  737.     { -1 }  /* end of table */
  738. };
  739.  
  740.  
  741.  
  742. /*************************************
  743.  *
  744.  *    Later Williams memory handlers
  745.  *
  746.  *************************************/
  747.  
  748. static struct MemoryReadAddress williams2_readmem[] =
  749. {
  750.     { 0x0000, 0x7fff, MRA_BANK1 },
  751.     { 0x8000, 0x87ff, MRA_BANK2 },
  752.     { 0x8800, 0x8fff, MRA_BANK3 },
  753.     { 0x9000, 0xbfff, MRA_RAM },
  754.     { 0xc000, 0xc7ff, MRA_RAM },
  755.     { 0xc980, 0xc983, pia_1_r },
  756.     { 0xc984, 0xc987, pia_0_r },
  757.     { 0xcbe0, 0xcbe0, williams_video_counter_r },
  758.     { 0xcc00, 0xcfff, MRA_RAM },
  759.     { 0xd000, 0xffff, MRA_ROM },
  760.     { -1 }    /* end of table */
  761. };
  762.  
  763.  
  764. static struct MemoryWriteAddress williams2_writemem[] =
  765. {
  766.     { 0x0000, 0x8fff, williams2_videoram_w, &videoram, &videoram_size },
  767.     { 0x9000, 0xbfff, MWA_RAM },
  768.     { 0xc000, 0xc7ff, MWA_RAM },
  769.     { 0xc800, 0xc800, williams2_bank_select_w },
  770.     { 0xc880, 0xc887, williams_blitter_w, &williams_blitterram },
  771.     { 0xc900, 0xc900, watchdog_reset_w },
  772.     { 0xc980, 0xc983, pia_1_w },
  773.     { 0xc984, 0xc987, pia_0_w },
  774.     { 0xc98c, 0xc98c, williams2_7segment_w },
  775.     { 0xcb00, 0xcb00, williams2_fg_select_w },
  776.     { 0xcb20, 0xcb20, williams2_bg_select_w },
  777.     { 0xcb40, 0xcb40, MWA_RAM, &williams2_xscroll_low },
  778.     { 0xcb60, 0xcb60, MWA_RAM, &williams2_xscroll_high },
  779.     { 0xcb80, 0xcb80, MWA_RAM },
  780.     { 0xcba0, 0xcba0, MWA_RAM, &williams2_blit_inhibit },
  781.     { 0xcc00, 0xcfff, MWA_RAM },
  782.     { 0xd000, 0xffff, MWA_ROM },
  783.     { -1 }    /* end of table */
  784. };
  785.  
  786.  
  787.  
  788. /*************************************
  789.  *
  790.  *    Sound board memory handlers
  791.  *
  792.  *************************************/
  793.  
  794. static struct MemoryReadAddress sound_readmem[] =
  795. {
  796.     { 0x0000, 0x007f, MRA_RAM },
  797.     { 0x0400, 0x0403, pia_2_r },
  798.     { 0x8400, 0x8403, pia_2_r },    /* used by Colony 7, perhaps others? */
  799.     { 0xb000, 0xffff, MRA_ROM },    /* most games start at $F000; Sinistar starts at $B000 */
  800.     { -1 }  /* end of table */
  801. };
  802.  
  803.  
  804. static struct MemoryWriteAddress sound_writemem[] =
  805. {
  806.     { 0x0000, 0x007f, MWA_RAM },
  807.     { 0x0400, 0x0403, pia_2_w },
  808.     { 0x8400, 0x8403, pia_2_w },    /* used by Colony 7, perhaps others? */
  809.     { 0xb000, 0xffff, MWA_ROM },    /* most games start at $F000; Sinistar starts at $B000 */
  810.     { -1 }  /* end of table */
  811. };
  812.  
  813.  
  814.  
  815. /*************************************
  816.  *
  817.  *    Later sound board memory handlers
  818.  *
  819.  *************************************/
  820.  
  821. static struct MemoryReadAddress williams2_sound_readmem[] =
  822. {
  823.     { 0x0000, 0x00ff, MRA_RAM },
  824.     { 0x2000, 0x2003, pia_2_r },
  825.     { 0xe000, 0xffff, MRA_ROM },
  826.     { -1 }    /* end of table */
  827. };
  828.  
  829.  
  830. static struct MemoryWriteAddress williams2_sound_writemem[] =
  831. {
  832.     { 0x0000, 0x00ff, MWA_RAM },
  833.     { 0x2000, 0x2003, pia_2_w },
  834.     { 0xe000, 0xffff, MWA_ROM },
  835.     { -1 }    /* end of table */
  836. };
  837.  
  838.  
  839.  
  840. /*************************************
  841.  *
  842.  *    Port definitions
  843.  *
  844.  *************************************/
  845.  
  846. INPUT_PORTS_START( defender )
  847.     PORT_START      /* IN0 */
  848.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1, "Fire", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  849.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2, "Thrust", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  850.     PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3, "Smart Bomb", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  851.     PORT_BITX(0x08, IP_ACTIVE_HIGH, IPT_BUTTON4, "Hyperspace", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  852.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  853.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  854.     PORT_BITX(0x40, IP_ACTIVE_HIGH, IPT_BUTTON6, "Reverse", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  855.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY )
  856.  
  857.     PORT_START      /* IN1 */
  858.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY )
  859.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  860.  
  861.     PORT_START      /* IN2 */
  862.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  863.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  864.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  865.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  866.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  867.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  868.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  869.  
  870.     PORT_START      /* IN3 - fake port for better joystick control */
  871.     /* This fake port is handled via defender_input_port_1 */
  872.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_CHEAT )
  873.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_CHEAT )
  874. INPUT_PORTS_END
  875.  
  876. INPUT_PORTS_START( colony7 )
  877.     PORT_START    /* IN0 */
  878.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
  879.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
  880.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
  881.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
  882.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  883.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  884.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  885.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  886.  
  887.     PORT_START    /* IN1 */
  888.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  889.     PORT_BIT( 0xfe, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  890.  
  891.     PORT_START    /* IN2 */
  892.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  893.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  894.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  895.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  896.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  897.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  898.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  899.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  900. INPUT_PORTS_END
  901.  
  902.  
  903. INPUT_PORTS_START( stargate )
  904.     PORT_START      /* IN0 */
  905.     PORT_BITX(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1, "Fire", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  906.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON2, "Thrust", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  907.     PORT_BITX(0x04, IP_ACTIVE_HIGH, IPT_BUTTON3, "Smart Bomb", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  908.     PORT_BITX(0x08, IP_ACTIVE_HIGH, IPT_BUTTON6, "Hyperspace", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  909.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  910.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  911.     PORT_BITX(0x40, IP_ACTIVE_HIGH, IPT_BUTTON4, "Reverse", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  912.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY )
  913.  
  914.     PORT_START      /* IN1 */
  915.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY )
  916.     PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON5, "Inviso", IP_KEY_DEFAULT, IP_JOY_DEFAULT )
  917.     PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  918.  
  919.     PORT_START      /* IN2 */
  920.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  921.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  922.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  923.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  924.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  925.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  926.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  927.  
  928.     PORT_START      /* IN3 - fake port for better joystick control */
  929.     /* This fake port is handled via stargate_input_port_0 */
  930.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_CHEAT )
  931.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_CHEAT )
  932. INPUT_PORTS_END
  933.  
  934.  
  935. INPUT_PORTS_START( joust )
  936.     PORT_START      /* IN0 */
  937.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER2 )
  938.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER2 )
  939.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
  940.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  941.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  942.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  943.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
  944.  
  945.     PORT_START      /* IN1 */
  946.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
  947.  
  948.     PORT_START      /* IN2 */
  949.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  950.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  951.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  952.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  953.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  954.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  955.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  956.  
  957.     PORT_START      /* IN3 (muxed with IN0) */
  958.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER1 )
  959.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER1 )
  960.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
  961.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  962.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  963.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  964.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
  965. INPUT_PORTS_END
  966.  
  967.  
  968. INPUT_PORTS_START( robotron )
  969.     PORT_START      /* IN0 */
  970.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP )
  971.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN )
  972.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT )
  973.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT )
  974.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  975.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  976.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP )
  977.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN )
  978.  
  979.     PORT_START      /* IN1 */
  980.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT )
  981.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT )
  982.     PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  983.  
  984.     PORT_START      /* IN2 */
  985.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  986.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  987.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  988.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  989.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  990.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  991.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  992. INPUT_PORTS_END
  993.  
  994.  
  995. INPUT_PORTS_START( bubbles )
  996.     PORT_START      /* IN0 */
  997.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
  998.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
  999.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
  1000.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
  1001.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
  1002.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
  1003.  
  1004.     PORT_START      /* IN1 */
  1005.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1006.  
  1007.     PORT_START      /* IN2 */
  1008.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1009.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1010.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  1011.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1012.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  1013.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  1014.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1015. INPUT_PORTS_END
  1016.  
  1017.  
  1018. INPUT_PORTS_START( splat )
  1019.     PORT_START      /* IN0 */
  1020.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP | IPF_8WAY | IPF_PLAYER2 )
  1021.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY | IPF_PLAYER2 )
  1022.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY | IPF_PLAYER2 )
  1023.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1024.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  1025.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  1026.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP | IPF_8WAY | IPF_PLAYER2 )
  1027.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN | IPF_8WAY | IPF_PLAYER2 )
  1028.  
  1029.     PORT_START      /* IN2 */
  1030.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT | IPF_8WAY | IPF_PLAYER2 )
  1031.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1032.     PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1033.  
  1034.     PORT_START      /* IN4 */
  1035.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1036.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1037.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  1038.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1039.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  1040.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  1041.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1042.  
  1043.     PORT_START      /* IN3 */
  1044.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP | IPF_8WAY | IPF_PLAYER1 )
  1045.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN | IPF_8WAY | IPF_PLAYER1 )
  1046.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT | IPF_8WAY | IPF_PLAYER1 )
  1047.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1048.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  1049.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  1050.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP | IPF_8WAY | IPF_PLAYER1 )
  1051.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN | IPF_8WAY | IPF_PLAYER1 )
  1052.  
  1053.     PORT_START      /* IN4 */
  1054.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT | IPF_8WAY | IPF_PLAYER1 )
  1055.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1056.     PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1057. INPUT_PORTS_END
  1058.  
  1059.  
  1060. INPUT_PORTS_START( sinistar )
  1061.     PORT_START      /* IN0 */
  1062.     /* pseudo analog joystick, see below */
  1063.  
  1064.     PORT_START      /* IN1 */
  1065.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  1066.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  1067.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  1068.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  1069.  
  1070.     PORT_START      /* IN2 */
  1071.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1072.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1073.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  1074.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1075.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  1076.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  1077.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1078.  
  1079.     PORT_START    /* fake, converted by sinistar_input_port_0() */
  1080.     PORT_ANALOG( 0xff, 0x38, IPT_AD_STICK_X, 100, 10, 0x00, 0x6f )
  1081.  
  1082.     PORT_START    /* fake, converted by sinistar_input_port_0() */
  1083.     PORT_ANALOG( 0xff, 0x38, IPT_AD_STICK_Y | IPF_REVERSE, 100, 10, 0x00, 0x6f )
  1084. INPUT_PORTS_END
  1085.  
  1086.  
  1087. INPUT_PORTS_START( blaster )
  1088.     PORT_START      /* IN0 */
  1089.     /* pseudo analog joystick, see below */
  1090.  
  1091.     PORT_START      /* IN1 */
  1092.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  1093.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  1094.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  1095.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1096.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  1097.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  1098.     PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
  1099.  
  1100.     PORT_START      /* IN2 */
  1101.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1102.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1103.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  1104.     PORT_BITX(0x08, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1105.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
  1106.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
  1107.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1108.  
  1109.     PORT_START    /* fake, converted by sinistar_input_port_0() */
  1110.     PORT_ANALOG( 0xff, 0x38, IPT_AD_STICK_X, 100, 10, 0x00, 0x6f )
  1111.  
  1112.     PORT_START    /* fake, converted by sinistar_input_port_0() */
  1113.     PORT_ANALOG( 0xff, 0x38, IPT_AD_STICK_Y | IPF_REVERSE, 100, 10, 0x00, 0x6f )
  1114. INPUT_PORTS_END
  1115.  
  1116.  
  1117. INPUT_PORTS_START( mysticm )
  1118.     PORT_START    /* IN1 */
  1119.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
  1120.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
  1121.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
  1122.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
  1123.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
  1124.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
  1125.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* Key */
  1126.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  1127.  
  1128.     PORT_START
  1129.     PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
  1130.  
  1131.     PORT_START    /* IN0 */
  1132.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1133.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1134.     PORT_BITX(0x04, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1135.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  1136.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
  1137.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 )
  1138.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1139.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
  1140. INPUT_PORTS_END
  1141.  
  1142.  
  1143. INPUT_PORTS_START( tshoot )
  1144.     PORT_START    /* IN0 (muxed with IN3)*/
  1145.     PORT_ANALOG(0x3F, 0x20, IPT_AD_STICK_Y, 25, 10, 0, 0x3F)
  1146.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1147.     PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON1 )
  1148.  
  1149.     PORT_START    /* IN1 */
  1150.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  1151.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  1152.     PORT_BIT( 0x3C, IP_ACTIVE_HIGH, IPT_UNUSED ) /* 0011-1100 output */
  1153.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  1154.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  1155.  
  1156.     PORT_START    /* IN2 */
  1157.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1158.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1159.     PORT_BITX(0x04, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1160.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  1161.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
  1162.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 )
  1163.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1164.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
  1165.  
  1166.     PORT_START    /* IN3 (muxed with IN0) */
  1167.        PORT_ANALOG(0x3F, 0x20, IPT_AD_STICK_X, 25, 10, 0, 0x3F)
  1168.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1169.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
  1170. INPUT_PORTS_END
  1171.  
  1172.  
  1173. INPUT_PORTS_START( inferno )
  1174.     PORT_START    /* IN0 (muxed with IN3) */
  1175.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKLEFT_UP )
  1176.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKLEFT_LEFT )
  1177.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKLEFT_RIGHT )
  1178.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKLEFT_DOWN )
  1179.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKRIGHT_UP )
  1180.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKRIGHT_LEFT )
  1181.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKRIGHT_RIGHT )
  1182.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPF_PLAYER1 | IPT_JOYSTICKRIGHT_DOWN )
  1183.  
  1184.     PORT_START /* IN1 */
  1185.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPF_PLAYER1 | IPT_BUTTON1 )
  1186.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPF_PLAYER2 | IPT_BUTTON1 )
  1187.     PORT_BIT( 0x3C, IP_ACTIVE_HIGH, IPT_UNUSED )
  1188.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
  1189.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
  1190.  
  1191.     PORT_START    /* IN2 */
  1192.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1193.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1194.     PORT_BITX(0x04, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1195.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  1196.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
  1197.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 )
  1198.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1199.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
  1200.  
  1201.     PORT_START    /* IN3 (muxed with IN0) */
  1202.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKLEFT_UP )
  1203.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKLEFT_LEFT )
  1204.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKLEFT_RIGHT )
  1205.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKLEFT_DOWN )
  1206.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKRIGHT_UP )
  1207.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKRIGHT_LEFT )
  1208.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKRIGHT_RIGHT )
  1209.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPF_PLAYER2 | IPT_JOYSTICKRIGHT_DOWN )
  1210. INPUT_PORTS_END
  1211.  
  1212.  
  1213. INPUT_PORTS_START( joust2 )
  1214.     PORT_START      /* IN0 */
  1215.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER1 )
  1216.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER1 )
  1217.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1218.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  1219.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1220.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1221.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  1222.  
  1223.     PORT_START      /* IN1 */
  1224.     PORT_BIT( 0xFF, IP_ACTIVE_HIGH, IPT_UNUSED )
  1225.  
  1226.     PORT_START    /* IN2 */
  1227.     PORT_BITX(0x01, IP_ACTIVE_HIGH, 0, "Auto Up", KEYCODE_F1, IP_JOY_NONE )
  1228.     PORT_BITX(0x02, IP_ACTIVE_HIGH, 0, "Advance", KEYCODE_F2, IP_JOY_NONE )
  1229.     PORT_BITX(0x04, IP_ACTIVE_HIGH, 0, "High Score Reset", KEYCODE_7, IP_JOY_NONE )
  1230.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
  1231.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
  1232.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 )
  1233.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
  1234.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
  1235.  
  1236.     PORT_START /* IN3 (muxed with IN0) */
  1237.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER2 )
  1238.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER2 )
  1239.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1240.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
  1241.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1242.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1243.     PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
  1244. INPUT_PORTS_END
  1245.  
  1246.  
  1247.  
  1248. /*************************************
  1249.  *
  1250.  *    Graphics definitions
  1251.  *
  1252.  *************************************/
  1253.  
  1254. static struct GfxLayout williams2_layout =
  1255. {
  1256.     24, 16,
  1257.     256,
  1258.     4,
  1259.     { 0, 1, 2, 3 },
  1260.     { 0+0*8, 4+0*8, 0+0*8+0x4000*8, 4+0*8+0x4000*8, 0+0*8+0x8000*8, 4+0*8+0x8000*8,
  1261.       0+1*8, 4+1*8, 0+1*8+0x4000*8, 4+1*8+0x4000*8, 0+1*8+0x8000*8, 4+1*8+0x8000*8,
  1262.       0+2*8, 4+2*8, 0+2*8+0x4000*8, 4+2*8+0x4000*8, 0+2*8+0x8000*8, 4+2*8+0x8000*8,
  1263.       0+3*8, 4+3*8, 0+3*8+0x4000*8, 4+3*8+0x4000*8, 0+3*8+0x8000*8, 4+3*8+0x8000*8
  1264.     },
  1265.     { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8, 32*8, 36*8, 40*8, 44*8, 48*8, 52*8, 56*8, 60*8 },
  1266.     4*16*8
  1267. };
  1268.  
  1269.  
  1270. static struct GfxDecodeInfo williams2_gfxdecodeinfo[] =
  1271. {
  1272.     { REGION_GFX1, 0, &williams2_layout, 16, 8 },
  1273.     { -1 } /* end of array */
  1274. };
  1275.  
  1276.  
  1277.  
  1278. /*************************************
  1279.  *
  1280.  *    Sound definitions
  1281.  *
  1282.  *************************************/
  1283.  
  1284. static struct DACinterface dac_interface =
  1285. {
  1286.     1,
  1287.     { 50 }
  1288. };
  1289.  
  1290.  
  1291. static struct hc55516_interface sinistar_cvsd_interface =
  1292. {
  1293.     1,    /* 1 chip */
  1294.     { 80 },
  1295. };
  1296.  
  1297.  
  1298.  
  1299. /*************************************
  1300.  *
  1301.  *    Machine driver
  1302.  *
  1303.  *************************************/
  1304.  
  1305. static struct MachineDriver machine_driver_defender =
  1306. {
  1307.     /* basic machine hardware  */
  1308.     {
  1309.         {
  1310.             CPU_M6809,
  1311.             1000000,
  1312.             defender_readmem,defender_writemem,0,0,
  1313.             ignore_interrupt,1
  1314.         },
  1315.         {
  1316.             CPU_M6808 | CPU_AUDIO_CPU,
  1317.             3579000/4,
  1318.             sound_readmem,sound_writemem,0,0,
  1319.             ignore_interrupt,1
  1320.         }
  1321.     },
  1322.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1323.     1,
  1324.     defender_init_machine,
  1325.  
  1326.     /* video hardware */
  1327.     304, 256,
  1328.     { 6, 298-1, 7, 247-1 },
  1329.     0,
  1330.     16,16,
  1331.     0,
  1332.  
  1333.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY,
  1334.     0,
  1335.     williams_vh_start,
  1336.     williams_vh_stop,
  1337.     williams_vh_screenrefresh,
  1338.  
  1339.     /* sound hardware */
  1340.     0,0,0,0,
  1341.     {
  1342.         {
  1343.             SOUND_DAC,
  1344.             &dac_interface
  1345.         }
  1346.     },
  1347.  
  1348.     nvram_handler
  1349. };
  1350.  
  1351.  
  1352. static struct MachineDriver machine_driver_williams =
  1353. {
  1354.     /* basic machine hardware  */
  1355.     {
  1356.         {
  1357.             CPU_M6809,
  1358.             1000000,
  1359.             williams_readmem,williams_writemem,0,0,
  1360.             ignore_interrupt,1
  1361.         },
  1362.         {
  1363.             CPU_M6808 | CPU_AUDIO_CPU,
  1364.             3579000/4,
  1365.             sound_readmem,sound_writemem,0,0,
  1366.             ignore_interrupt,1
  1367.         }
  1368.     },
  1369.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1370.     1,
  1371.     williams_init_machine,
  1372.  
  1373.     /* video hardware */
  1374.     304, 256,
  1375.     { 6, 298-1, 7, 247-1 },
  1376.     0,
  1377.     16,16,
  1378.     0,
  1379.  
  1380.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY,
  1381.     0,
  1382.     williams_vh_start,
  1383.     williams_vh_stop,
  1384.     williams_vh_screenrefresh,
  1385.  
  1386.     /* sound hardware */
  1387.     0,0,0,0,
  1388.     {
  1389.         {
  1390.             SOUND_DAC,
  1391.             &dac_interface
  1392.         }
  1393.     },
  1394.  
  1395.     nvram_handler
  1396. };
  1397.  
  1398.  
  1399. static struct MachineDriver machine_driver_sinistar =
  1400. {
  1401.     /* basic machine hardware  */
  1402.     {
  1403.         {
  1404.             CPU_M6809,
  1405.             1000000,
  1406.             williams_readmem,williams_writemem,0,0,
  1407.             ignore_interrupt,1
  1408.         },
  1409.         {
  1410.             CPU_M6808 | CPU_AUDIO_CPU,
  1411.             3579000/4,
  1412.             sound_readmem,sound_writemem,0,0,
  1413.             ignore_interrupt,1
  1414.         }
  1415.     },
  1416.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1417.     1,
  1418.     williams_init_machine,
  1419.  
  1420.     /* video hardware */
  1421.     304, 256,
  1422.     { 6, 298-1, 7, 247-1 },
  1423.     0,
  1424.     16,16,
  1425.     0,
  1426.  
  1427.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_SUPPORTS_DIRTY,
  1428.     0,
  1429.     williams_vh_start,
  1430.     williams_vh_stop,
  1431.     williams_vh_screenrefresh,
  1432.  
  1433.     /* sound hardware */
  1434.     0,0,0,0,
  1435.     {
  1436.         {
  1437.             SOUND_DAC,
  1438.             &dac_interface
  1439.         },
  1440.         {
  1441.             SOUND_HC55516,
  1442.             &sinistar_cvsd_interface
  1443.         }
  1444.     },
  1445.  
  1446.     nvram_handler
  1447. };
  1448.  
  1449.  
  1450. static struct MachineDriver machine_driver_blaster =
  1451. {
  1452.     /* basic machine hardware  */
  1453.     {
  1454.         {
  1455.             CPU_M6809,
  1456.             1000000,
  1457.             blaster_readmem,blaster_writemem,0,0,
  1458.             ignore_interrupt,1
  1459.         },
  1460.         {
  1461.             CPU_M6808 | CPU_AUDIO_CPU,
  1462.             3579000/4,
  1463.             sound_readmem,sound_writemem,0,0,
  1464.             ignore_interrupt,1
  1465.         }
  1466.     },
  1467.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1468.     1,
  1469.     williams_init_machine,
  1470.  
  1471.     /* video hardware */
  1472.     304, 256,
  1473.     { 6, 298-1, 7, 247-1 },
  1474.     0,
  1475.     16+256,16+256,
  1476.     0,
  1477.  
  1478.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1479.     0,
  1480.     blaster_vh_start,
  1481.     williams_vh_stop,
  1482.     blaster_vh_screenrefresh,
  1483.  
  1484.     /* sound hardware */
  1485.     0,0,0,0,
  1486.     {
  1487.         {
  1488.             SOUND_DAC,
  1489.             &dac_interface
  1490.         }
  1491.     },
  1492.  
  1493.     nvram_handler
  1494. };
  1495.  
  1496.  
  1497. static struct MachineDriver machine_driver_williams2 =
  1498. {
  1499.     /* basic machine hardware  */
  1500.     {
  1501.         {
  1502.             CPU_M6809,
  1503.             1000000,
  1504.             williams2_readmem,williams2_writemem,0,0,
  1505.             ignore_interrupt,1
  1506.         },
  1507.         {
  1508.             CPU_M6808 | CPU_AUDIO_CPU,
  1509.             3579000/4,
  1510.             williams2_sound_readmem,williams2_sound_writemem,0,0,
  1511.             ignore_interrupt,1
  1512.         }
  1513.     },
  1514.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1515.     1,
  1516.     williams2_init_machine,
  1517.  
  1518.     /* video hardware */
  1519.     288, 256,
  1520.     { 4, 288-1, 8, 248-1 },
  1521.     williams2_gfxdecodeinfo,
  1522.     16+8*16,16+8*16,
  1523.     0,
  1524.  
  1525.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1526.     0,
  1527.     williams2_vh_start,
  1528.     williams2_vh_stop,
  1529.     williams_vh_screenrefresh,
  1530.  
  1531.     /* sound hardware */
  1532.     0,0,0,0,
  1533.     {
  1534.         {
  1535.             SOUND_DAC,
  1536.             &dac_interface
  1537.         }
  1538.     },
  1539.  
  1540.     nvram_handler
  1541. };
  1542.  
  1543.  
  1544. static struct MachineDriver machine_driver_joust2 =
  1545. {
  1546.     /* basic machine hardware  */
  1547.     {
  1548.         {
  1549.             CPU_M6809,
  1550.             1000000,
  1551.             williams2_readmem,williams2_writemem,0,0,
  1552.             ignore_interrupt,1
  1553.         },
  1554.         {
  1555.             CPU_M6808 | CPU_AUDIO_CPU,
  1556.             3579000/4,
  1557.             williams2_sound_readmem,williams2_sound_writemem,0,0,
  1558.             ignore_interrupt,1
  1559.         },
  1560.         SOUND_CPU_WILLIAMS_CVSD
  1561.     },
  1562.     60, DEFAULT_60HZ_VBLANK_DURATION,
  1563.     1,
  1564.     joust2_init_machine,
  1565.  
  1566.     /* video hardware */
  1567.     288, 256,
  1568.     { 4, 288-1, 8, 248-1 },
  1569.     williams2_gfxdecodeinfo,
  1570.     16+8*16,16+8*16,
  1571.     0,
  1572.  
  1573.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1574.     0,
  1575.     williams2_vh_start,
  1576.     williams2_vh_stop,
  1577.     williams_vh_screenrefresh,
  1578.  
  1579.     /* sound hardware */
  1580.     0,0,0,0,
  1581.     {
  1582.         SOUND_WILLIAMS_CVSD
  1583.     },
  1584.  
  1585.     nvram_handler
  1586. };
  1587.  
  1588.  
  1589.  
  1590. /*************************************
  1591.  *
  1592.  *    Driver initialization
  1593.  *
  1594.  *************************************/
  1595.  
  1596. static void init_defender(void)
  1597. {
  1598.     static const UINT32 bank[8] = { 0x0c000, 0x10000, 0x11000, 0x12000, 0x0c000, 0x0c000, 0x0c000, 0x13000 };
  1599.     defender_bank_list = bank;
  1600.  
  1601.     /* CMOS configuration */
  1602.     CONFIGURE_CMOS(0xc400, 0x100);
  1603.  
  1604.     /* PIA configuration */
  1605.     CONFIGURE_PIAS(defender_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1606. }
  1607.  
  1608.  
  1609. static void init_defndjeu(void)
  1610. {
  1611. /*
  1612.     Note: Please do not remove these comments in BETA versions. They are
  1613.             helpful to get the games working. When they will work, useless
  1614.             comments may be removed as desired.
  1615.  
  1616.     The encryption in this game is one of the silliest I have ever seen.
  1617.     I just wondered if the ROMs were encrypted, and figured out how they
  1618.     were in just about 5 mins...
  1619.     Very simple: bits 0 and 7 are swapped in the ROMs (not sound).
  1620.  
  1621.     Game does not work due to bad ROMs 16 and 20. However, the others are
  1622.     VERY similar (if not nearly SAME) to MAYDAY and DEFENSE ones (and NOT
  1623.     DEFENDER), although MAYDAY ROMs are more similar than DEFENSE ones...
  1624.     By putting MAYDAY ROMs and encrypting them, I got a first machine test
  1625.     and then, reboot... The test was the random graphic drawings, which
  1626.     were bad. Each time the full screen was drawn, the game rebooted.
  1627.     Unfortunately, I don't remember which roms I took to get that, and I
  1628.     could not get the same result anymore (I did not retry ALL the
  1629.     possibilities I did at 01:30am). :-(
  1630.  
  1631.     ROM equivalences (not including the sound ROM):
  1632.  
  1633.     MAYDAY      MAYDAY (Alternate)    DEFENSE       JEUTEL's Defender
  1634.     -----------------------------------------------------------------
  1635.     ROMC.BIN    IC03-3.BIN            DFNDR-C.ROM           15
  1636.     ROMB.BIN    IC02-2.BIN            DFNDR-B.ROM           16
  1637.     ROMA.BIN    IC01-1.BIN            DFNDR-A.ROM           17
  1638.     ROMG.BIN    IC07-7D.BIN           DFNDR-G.ROM           18
  1639.     ROMF.BIN    IC06-6.BIN            DFNDR-F.ROM           19
  1640.     ROME.BIN    IC05-5.BIN            DFNDR-E.ROM           20
  1641.     ROMD.BIN    IC04-4.BIN            DFNDR-D.ROM           21
  1642. */
  1643.  
  1644.     UINT8 *rom = memory_region(REGION_CPU1);
  1645.     int x;
  1646.  
  1647.     for (x = 0xd000; x < 0x15000; x++)
  1648.     {
  1649.         UINT8 src = rom[x];
  1650.         rom[x] = (src & 0x7e) | (src >> 7) | (src << 7);
  1651.     }
  1652. }
  1653.  
  1654. #if 0
  1655. static void init_defcmnd(void)
  1656. {
  1657.     static const UINT32 bank[8] = { 0x0c000, 0x10000, 0x11000, 0x12000, 0x13000, 0x0c000, 0x0c000, 0x14000 };
  1658.     defender_bank_list = bank;
  1659.  
  1660.     /* CMOS configuration */
  1661.     CONFIGURE_CMOS(0xc400, 0x100);
  1662.  
  1663.     /* PIA configuration */
  1664.     CONFIGURE_PIAS(williams_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1665. }
  1666. #endif
  1667.  
  1668. static void init_mayday(void)
  1669. {
  1670.     static const UINT32 bank[8] = { 0x0c000, 0x10000, 0x11000, 0x12000, 0x0c000, 0x0c000, 0x0c000, 0x13000 };
  1671.     defender_bank_list = bank;
  1672.  
  1673.     /* CMOS configuration */
  1674.     CONFIGURE_CMOS(0xc400, 0x100);
  1675.  
  1676.     /* PIA configuration */
  1677.     CONFIGURE_PIAS(williams_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1678.  
  1679.     /* install a handler to catch protection checks */
  1680.     mayday_protection = install_mem_read_handler(0, 0xa190, 0xa191, mayday_protection_r);
  1681. }
  1682.  
  1683.  
  1684. static void init_colony7(void)
  1685. {
  1686.     static const UINT32 bank[8] = { 0x0c000, 0x10000, 0x11000, 0x12000, 0x0c000, 0x0c000, 0x0c000, 0x0c000 };
  1687.     defender_bank_list = bank;
  1688.  
  1689.     /* CMOS configuration */
  1690.     CONFIGURE_CMOS(0xc400, 0x100);
  1691.  
  1692.     /* PIA configuration */
  1693.     CONFIGURE_PIAS(williams_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1694. }
  1695.  
  1696.  
  1697. static void init_stargate(void)
  1698. {
  1699.     /* CMOS configuration */
  1700.     CONFIGURE_CMOS(0xcc00, 0x400);
  1701.  
  1702.     /* PIA configuration */
  1703.     CONFIGURE_PIAS(stargate_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1704. }
  1705.  
  1706.  
  1707. static void init_joust(void)
  1708. {
  1709.     /* CMOS configuration */
  1710.     CONFIGURE_CMOS(0xcc00, 0x400);
  1711.  
  1712.     /* video configuration */
  1713.     CONFIGURE_BLITTER(4, 0, 0);
  1714.  
  1715.     /* PIA configuration */
  1716.     CONFIGURE_PIAS(williams_muxed_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1717. }
  1718.  
  1719.  
  1720. static void init_robotron(void)
  1721. {
  1722.     /* CMOS configuration */
  1723.     CONFIGURE_CMOS(0xcc00, 0x400);
  1724.  
  1725.     /* video configuration */
  1726.     CONFIGURE_BLITTER(4, 0, 0);
  1727.  
  1728.     /* PIA configuration */
  1729.     CONFIGURE_PIAS(williams_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1730. }
  1731.  
  1732.  
  1733. static void init_bubbles(void)
  1734. {
  1735.     /* CMOS configuration */
  1736.     CONFIGURE_CMOS(0xcc00, 0x400);
  1737.  
  1738.     /* video configuration */
  1739.     CONFIGURE_BLITTER(4, 0, 0);
  1740.  
  1741.     /* PIA configuration */
  1742.     CONFIGURE_PIAS(williams_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1743. }
  1744.  
  1745.  
  1746. static void init_splat(void)
  1747. {
  1748.     /* CMOS configuration */
  1749.     CONFIGURE_CMOS(0xcc00, 0x400);
  1750.  
  1751.     /* video configuration */
  1752.     CONFIGURE_BLITTER(0, 0, 0);
  1753.  
  1754.     /* PIA configuration */
  1755.     CONFIGURE_PIAS(williams_dual_muxed_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1756. }
  1757.  
  1758.  
  1759. static void init_sinistar(void)
  1760. {
  1761.     /* CMOS configuration */
  1762.     CONFIGURE_CMOS(0xcc00, 0x400);
  1763.  
  1764.     /* video configuration */
  1765.     CONFIGURE_BLITTER(4, 0, 1);
  1766.  
  1767.     /* PIA configuration */
  1768.     CONFIGURE_PIAS(williams_49way_pia_0_intf, williams_pia_1_intf, sinistar_snd_pia_intf);
  1769.  
  1770.     /* install RAM instead of ROM in the Dxxx slot */
  1771.     install_mem_read_handler (0, 0xd000, 0xdfff, MRA_RAM);
  1772.     install_mem_write_handler(0, 0xd000, 0xdfff, MWA_RAM);
  1773. }
  1774.  
  1775.  
  1776. static void init_blaster(void)
  1777. {
  1778.     /* CMOS configuration */
  1779.     CONFIGURE_CMOS(0xcc00, 0x400);
  1780.  
  1781.     /* video configuration */
  1782.     CONFIGURE_BLITTER(0, 1, 0);
  1783.  
  1784.     /* PIA configuration */
  1785.     CONFIGURE_PIAS(williams_49way_pia_0_intf, williams_pia_1_intf, williams_snd_pia_intf);
  1786. }
  1787.  
  1788.  
  1789. static void init_tshoot(void)
  1790. {
  1791.     static const UINT8 tilemap_colors[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 };
  1792.  
  1793.     /* CMOS configuration */
  1794.     CONFIGURE_CMOS(0xcc00, 0x400);
  1795.  
  1796.     /* video configuration */
  1797.     CONFIGURE_BLITTER(0, 0, 0);
  1798.     CONFIGURE_TILEMAP(0x7f, tilemap_colors, 1, 0, 0);
  1799.  
  1800.     /* PIA configuration */
  1801.     CONFIGURE_PIAS(tshoot_pia_0_intf, williams2_pia_1_intf, tshoot_snd_pia_intf);
  1802. }
  1803.  
  1804.  
  1805. static void init_joust2(void)
  1806. {
  1807.     static const UINT8 tilemap_colors[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  1808.  
  1809.     /* CMOS configuration */
  1810.     CONFIGURE_CMOS(0xcc00, 0x400);
  1811.  
  1812.     /* video configuration */
  1813.     CONFIGURE_BLITTER(0, 0, 0);
  1814.     CONFIGURE_TILEMAP(0xff, tilemap_colors, 0, -2, 0);
  1815.  
  1816.     /* PIA configuration */
  1817.     CONFIGURE_PIAS(williams2_muxed_pia_0_intf, joust2_pia_1_intf, williams2_snd_pia_intf);
  1818.  
  1819.     /* expand the sound ROMs */
  1820.     memcpy(&memory_region(REGION_CPU3)[0x18000], &memory_region(REGION_CPU3)[0x10000], 0x08000);
  1821.     memcpy(&memory_region(REGION_CPU3)[0x20000], &memory_region(REGION_CPU3)[0x10000], 0x10000);
  1822.     memcpy(&memory_region(REGION_CPU3)[0x38000], &memory_region(REGION_CPU3)[0x30000], 0x08000);
  1823.     memcpy(&memory_region(REGION_CPU3)[0x40000], &memory_region(REGION_CPU3)[0x30000], 0x10000);
  1824.     memcpy(&memory_region(REGION_CPU3)[0x58000], &memory_region(REGION_CPU3)[0x50000], 0x08000);
  1825.     memcpy(&memory_region(REGION_CPU3)[0x60000], &memory_region(REGION_CPU3)[0x50000], 0x10000);
  1826. }
  1827.  
  1828.  
  1829. static void init_mysticm(void)
  1830. {
  1831.     static const UINT8 tilemap_colors[] = { 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
  1832.  
  1833.     /* CMOS configuration */
  1834.     CONFIGURE_CMOS(0xcc00, 0x400);
  1835.  
  1836.     /* video configuration */
  1837.     CONFIGURE_BLITTER(0, 0, 0);
  1838.     CONFIGURE_TILEMAP(0x7f, tilemap_colors, 1, 0, 1);
  1839.  
  1840.     /* PIA configuration */
  1841.     CONFIGURE_PIAS(mysticm_pia_0_intf, williams2_pia_1_intf, williams2_snd_pia_intf);
  1842.  
  1843.     /* install RAM instead of ROM in the Dxxx slot */
  1844.     install_mem_read_handler (0, 0xd000, 0xdfff, MRA_RAM);
  1845.     install_mem_write_handler(0, 0xd000, 0xdfff, MWA_RAM);
  1846. }
  1847.  
  1848.  
  1849. static void init_inferno(void)
  1850. {
  1851.     static const UINT8 tilemap_colors[] = { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 };
  1852.  
  1853.     /* CMOS configuration */
  1854.     CONFIGURE_CMOS(0xcc00, 0x400);
  1855.  
  1856.     /* video configuration */
  1857.     CONFIGURE_BLITTER(0, 0, 0);
  1858.     CONFIGURE_TILEMAP(0x7f, tilemap_colors, 1, 0, 0);
  1859.  
  1860.     /* PIA configuration */
  1861.     CONFIGURE_PIAS(williams2_muxed_pia_0_intf, williams2_pia_1_intf, williams2_snd_pia_intf);
  1862.  
  1863.     /* install RAM instead of ROM in the Dxxx slot */
  1864.     install_mem_read_handler (0, 0xd000, 0xdfff, MRA_RAM);
  1865.     install_mem_write_handler(0, 0xd000, 0xdfff, MWA_RAM);
  1866. }
  1867.  
  1868.  
  1869.  
  1870. /*************************************
  1871.  *
  1872.  *    ROM definitions
  1873.  *
  1874.  *************************************/
  1875.  
  1876. ROM_START( defender )
  1877.     ROM_REGION( 0x14000, REGION_CPU1 )
  1878.     ROM_LOAD( "defend.1",     0x0d000, 0x0800, 0xc3e52d7e )
  1879.     ROM_LOAD( "defend.4",     0x0d800, 0x0800, 0x9a72348b )
  1880.     ROM_LOAD( "defend.2",     0x0e000, 0x1000, 0x89b75984 )
  1881.     ROM_LOAD( "defend.3",     0x0f000, 0x1000, 0x94f51e9b )
  1882.     /* bank 0 is the place for CMOS ram */
  1883.     ROM_LOAD( "defend.9",     0x10000, 0x0800, 0x6870e8a5 )
  1884.     ROM_LOAD( "defend.12",    0x10800, 0x0800, 0xf1f88938 )
  1885.     ROM_LOAD( "defend.8",     0x11000, 0x0800, 0xb649e306 )
  1886.     ROM_LOAD( "defend.11",    0x11800, 0x0800, 0x9deaf6d9 )
  1887.     ROM_LOAD( "defend.7",     0x12000, 0x0800, 0x339e092e )
  1888.     ROM_LOAD( "defend.10",    0x12800, 0x0800, 0xa543b167 )
  1889.     ROM_RELOAD(               0x13800, 0x0800 )
  1890.     ROM_LOAD( "defend.6",     0x13000, 0x0800, 0x65f4efd1 )
  1891.  
  1892.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  1893.     ROM_LOAD( "defend.snd",   0xf800, 0x0800, 0xfefd5b48 )
  1894. ROM_END
  1895.  
  1896.  
  1897. ROM_START( defendg )
  1898.     ROM_REGION( 0x14000, REGION_CPU1 )
  1899.     ROM_LOAD( "defeng01.bin", 0x0d000, 0x0800, 0x6111d74d )
  1900.     ROM_LOAD( "defeng04.bin", 0x0d800, 0x0800, 0x3cfc04ce )
  1901.     ROM_LOAD( "defeng02.bin", 0x0e000, 0x1000, 0xd184ab6b )
  1902.     ROM_LOAD( "defeng03.bin", 0x0f000, 0x1000, 0x788b76d7 )
  1903.     /* bank 0 is the place for CMOS ram */
  1904.     ROM_LOAD( "defeng09.bin", 0x10000, 0x0800, 0xf57caa62 )
  1905.     ROM_LOAD( "defeng12.bin", 0x10800, 0x0800, 0x33db686f )
  1906.     ROM_LOAD( "defeng08.bin", 0x11000, 0x0800, 0x9a9eb3d2 )
  1907.     ROM_LOAD( "defeng11.bin", 0x11800, 0x0800, 0x5ca4e860 )
  1908.     ROM_LOAD( "defeng07.bin", 0x12000, 0x0800, 0x545c3326 )
  1909.     ROM_LOAD( "defeng10.bin", 0x12800, 0x0800, 0x941cf34e )
  1910.     ROM_RELOAD(               0x13800, 0x0800 )
  1911.     ROM_LOAD( "defeng06.bin", 0x13000, 0x0800, 0x3af34c05 )
  1912.  
  1913.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  1914.     ROM_LOAD( "defend.snd",   0xf800, 0x0800, 0xfefd5b48 )
  1915. ROM_END
  1916.  
  1917.  
  1918. ROM_START( defendw )
  1919.     ROM_REGION( 0x14000, REGION_CPU1 )
  1920.     ROM_LOAD( "wb01.bin",     0x0d000, 0x1000, 0x0ee1019d )
  1921.     ROM_LOAD( "defeng02.bin", 0x0e000, 0x1000, 0xd184ab6b )
  1922.     ROM_LOAD( "wb03.bin",     0x0f000, 0x1000, 0xa732d649 )
  1923.     /* bank 0 is the place for CMOS ram */
  1924.     ROM_LOAD( "defeng09.bin", 0x10000, 0x0800, 0xf57caa62 )
  1925.     ROM_LOAD( "defeng12.bin", 0x10800, 0x0800, 0x33db686f )
  1926.     ROM_LOAD( "defeng08.bin", 0x11000, 0x0800, 0x9a9eb3d2 )
  1927.     ROM_LOAD( "defeng11.bin", 0x11800, 0x0800, 0x5ca4e860 )
  1928.     ROM_LOAD( "defeng07.bin", 0x12000, 0x0800, 0x545c3326 )
  1929.     ROM_LOAD( "defeng10.bin", 0x12800, 0x0800, 0x941cf34e )
  1930.     ROM_RELOAD(               0x13800, 0x0800 )
  1931.     ROM_LOAD( "defeng06.bin", 0x13000, 0x0800, 0x3af34c05 )
  1932.  
  1933.     ROM_REGION( 0x10000, REGION_CPU2 )
  1934.     ROM_LOAD( "defend.snd",   0xf800, 0x0800, 0xfefd5b48 )
  1935. ROM_END
  1936.  
  1937.  
  1938. ROM_START( defndjeu )
  1939.     ROM_REGION( 0x15000, REGION_CPU1 )
  1940.     ROM_LOAD( "15", 0x0d000, 0x1000, 0x706a24bd )
  1941.     ROM_LOAD( "16", 0x0e000, 0x1000, 0x03201532 )
  1942.     ROM_LOAD( "17", 0x0f000, 0x1000, 0x25287eca )
  1943.     /* bank 0 is the place for CMOS ram */
  1944.     ROM_LOAD( "18", 0x10000, 0x1000, 0xe99d5679 )
  1945.     ROM_LOAD( "19", 0x11000, 0x1000, 0x769f5984 )
  1946.     ROM_LOAD( "20", 0x12000, 0x1000, 0x12fa0788 )
  1947.     ROM_LOAD( "21", 0x13000, 0x1000, 0xbddb71a3 )
  1948.     ROM_RELOAD(     0x14000, 0x1000 )
  1949.  
  1950.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  1951.     ROM_LOAD( "s", 0xf800, 0x0800, 0xcb79ae42 )
  1952. ROM_END
  1953.  
  1954.  
  1955. ROM_START( defcmnd )
  1956.     ROM_REGION( 0x15000, REGION_CPU1 )
  1957.     ROM_LOAD( "defcmnda.1",   0x0d000, 0x1000, 0x68effc1d )
  1958.     ROM_LOAD( "defcmnda.2",   0x0e000, 0x1000, 0x1126adc9 )
  1959.     ROM_LOAD( "defcmnda.3",   0x0f000, 0x1000, 0x7340209d )
  1960.     /* bank 0 is the place for CMOS ram */
  1961.     ROM_LOAD( "defcmnda.10",  0x10000, 0x0800, 0x3dddae75 )
  1962.     ROM_LOAD( "defcmnda.7",   0x10800, 0x0800, 0x3f1e7cf8 )
  1963.     ROM_LOAD( "defcmnda.9",   0x11000, 0x0800, 0x8882e1ff )
  1964.     ROM_LOAD( "defcmnda.6",   0x11800, 0x0800, 0xd068f0c5 )
  1965.     ROM_LOAD( "defcmnda.8",   0x12000, 0x0800, 0xfef4cb77 )
  1966.     ROM_LOAD( "defcmnda.5",   0x12800, 0x0800, 0x49b50b40 )
  1967.     ROM_LOAD( "defcmnda.4",   0x13000, 0x0800, 0x43d42a1b )
  1968.  
  1969.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  1970.     ROM_LOAD( "defcmnda.snd", 0xf800, 0x0800, 0xf122d9c9 )
  1971. ROM_END
  1972.  
  1973.  
  1974. ROM_START( defence )
  1975.     ROM_REGION( 0x15000, REGION_CPU1 )
  1976.     ROM_LOAD( "1",            0x0d000, 0x1000, 0xebc93622 )
  1977.     ROM_LOAD( "2",            0x0e000, 0x1000, 0x2a4f4f44 )
  1978.     ROM_LOAD( "3",            0x0f000, 0x1000, 0xa4112f91 )
  1979.     /* bank 0 is the place for CMOS ram */
  1980.     ROM_LOAD( "0",            0x10000, 0x0800, 0x7a1e5998 )
  1981.     ROM_LOAD( "7",            0x10800, 0x0800, 0x4c2616a3 )
  1982.     ROM_LOAD( "9",            0x11000, 0x0800, 0x7b146003 )
  1983.     ROM_LOAD( "6",            0x11800, 0x0800, 0x6d748030 )
  1984.     ROM_LOAD( "8",            0x12000, 0x0800, 0x52d5438b )
  1985.     ROM_LOAD( "5",            0x12800, 0x0800, 0x4a270340 )
  1986.     ROM_LOAD( "4",            0x13000, 0x0800, 0xe13f457c )
  1987.  
  1988.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  1989.     ROM_LOAD( "defcmnda.snd", 0xf800, 0x0800, 0xf122d9c9 )
  1990. ROM_END
  1991.  
  1992.  
  1993. ROM_START( defcomnd )
  1994.     ROM_REGION( 0x15000, REGION_CPU1 )
  1995.     ROM_LOAD( "dfndr-c.rom", 0x0d000, 0x1000, 0x2a256b93 )
  1996.     ROM_LOAD( "dfndr-b.rom", 0x0e000, 0x1000, 0xe34e87fc )
  1997.     ROM_LOAD( "dfndr-a.rom", 0x0f000, 0x1000, 0xf78d62fa )
  1998.     /* bank 0 is the place for CMOS ram */
  1999.     ROM_LOAD( "dfndr-d.rom", 0x10000, 0x1000, 0xef2179fe )
  2000.     ROM_LOAD( "dfndr-e.rom", 0x11000, 0x1000, 0x4fa3d99c )
  2001.     ROM_LOAD( "dfndr-f.rom", 0x12000, 0x1000, 0x03721aa7 )
  2002.     ROM_LOAD( "dfndr-i.rom", 0x13000, 0x1000, 0x5998a4cf )
  2003.     ROM_LOAD( "dfndr-g.rom", 0x14000, 0x1000, 0xa1b63291 )
  2004.  
  2005.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2006.     ROM_LOAD( "dfndr-h.rom", 0xf000, 0x1000, 0x30fced3d )
  2007. ROM_END
  2008.  
  2009.  
  2010. ROM_START( mayday )
  2011.     ROM_REGION( 0x15000, REGION_CPU1 )
  2012.     ROM_LOAD( "ic03-3.bin",  0x0d000, 0x1000, 0xa1ff6e62 )
  2013.     ROM_LOAD( "ic02-2.bin",  0x0e000, 0x1000, 0x62183aea )
  2014.     ROM_LOAD( "ic01-1.bin",  0x0f000, 0x1000, 0x5dcb113f )
  2015.     /* bank 0 is the place for CMOS ram */
  2016.     ROM_LOAD( "ic04-4.bin",  0x10000, 0x1000, 0xea6a4ec8 )
  2017.     ROM_LOAD( "ic05-5.bin",  0x11000, 0x1000, 0x0d797a3e )
  2018.     ROM_LOAD( "ic06-6.bin",  0x12000, 0x1000, 0xee8bfcd6 )
  2019.     ROM_LOAD( "ic07-7d.bin", 0x13000, 0x1000, 0xd9c065e7 )
  2020.     ROM_RELOAD(              0x14000, 0x1000 )
  2021.  
  2022.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2023.     ROM_LOAD( "ic28-8.bin",  0xf800, 0x0800, 0xfefd5b48 )
  2024.     /* Sound ROM is same in both versions. Can be merged !!! */
  2025. ROM_END
  2026.  
  2027.  
  2028. ROM_START( maydaya )
  2029.     ROM_REGION( 0x15000, REGION_CPU1 )
  2030.     ROM_LOAD( "mayday.c", 0x0d000, 0x1000, 0x872a2f2d )
  2031.     ROM_LOAD( "mayday.b", 0x0e000, 0x1000, 0xc4ab5e22 )
  2032.     ROM_LOAD( "mayday.a", 0x0f000, 0x1000, 0x329a1318 )
  2033.     /* bank 0 is the place for CMOS ram */
  2034.     ROM_LOAD( "mayday.d", 0x10000, 0x1000, 0xc2ae4716 )
  2035.     ROM_LOAD( "mayday.e", 0x11000, 0x1000, 0x41225666 )
  2036.     ROM_LOAD( "mayday.f", 0x12000, 0x1000, 0xc39be3c0 )
  2037.     ROM_LOAD( "mayday.g", 0x13000, 0x1000, 0x2bd0f106 )
  2038.     ROM_RELOAD(           0x14000, 0x1000 )
  2039.  
  2040.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2041.     ROM_LOAD( "ic28-8.bin", 0xf800, 0x0800, 0xfefd5b48 )
  2042. ROM_END
  2043.  
  2044.  
  2045. ROM_START( colony7 )
  2046.     ROM_REGION( 0x14000, REGION_CPU1 )
  2047.     ROM_LOAD( "cs03.bin",     0x0d000, 0x1000, 0x7ee75ae5 )
  2048.     ROM_LOAD( "cs02.bin",     0x0e000, 0x1000, 0xc60b08cb )
  2049.     ROM_LOAD( "cs01.bin",     0x0f000, 0x1000, 0x1bc97436 )
  2050.     /* bank 0 is the place for CMOS ram */
  2051.     ROM_LOAD( "cs06.bin",     0x10000, 0x0800, 0x318b95af )
  2052.     ROM_LOAD( "cs04.bin",     0x10800, 0x0800, 0xd740faee )
  2053.     ROM_LOAD( "cs07.bin",     0x11000, 0x0800, 0x0b23638b )
  2054.     ROM_LOAD( "cs05.bin",     0x11800, 0x0800, 0x59e406a8 )
  2055.     ROM_LOAD( "cs08.bin",     0x12000, 0x0800, 0x3bfde87a )
  2056.     ROM_RELOAD(           0x12800, 0x0800 )
  2057.  
  2058.     ROM_REGION( 0x10000, REGION_CPU2 )
  2059.     ROM_LOAD( "cs11.bin",     0xf800, 0x0800, 0x6032293c ) /* Sound ROM */
  2060. ROM_END
  2061.  
  2062.  
  2063. ROM_START( colony7a )
  2064.     ROM_REGION( 0x14000, REGION_CPU1 )
  2065.     ROM_LOAD( "cs03a.bin",    0x0d000, 0x1000, 0xe0b0d23b )
  2066.     ROM_LOAD( "cs02a.bin",    0x0e000, 0x1000, 0x370c6f41 )
  2067.     ROM_LOAD( "cs01a.bin",    0x0f000, 0x1000, 0xba299946 )
  2068.     /* bank 0 is the place for CMOS ram */
  2069.     ROM_LOAD( "cs06.bin",     0x10000, 0x0800, 0x318b95af )
  2070.     ROM_LOAD( "cs04.bin",     0x10800, 0x0800, 0xd740faee )
  2071.     ROM_LOAD( "cs07.bin",     0x11000, 0x0800, 0x0b23638b )
  2072.     ROM_LOAD( "cs05.bin",     0x11800, 0x0800, 0x59e406a8 )
  2073.     ROM_LOAD( "cs08.bin",     0x12000, 0x0800, 0x3bfde87a )
  2074.     ROM_RELOAD(            0x12800, 0x0800 )
  2075.  
  2076.     ROM_REGION( 0x10000, REGION_CPU2 )
  2077.     ROM_LOAD( "cs11.bin",     0xf800, 0x0800, 0x6032293c ) /* Sound ROM */
  2078. ROM_END
  2079.  
  2080.  
  2081. ROM_START( stargate )
  2082.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2083.     ROM_LOAD( "01",           0x0000, 0x1000, 0x88824d18 )
  2084.     ROM_LOAD( "02",           0x1000, 0x1000, 0xafc614c5 )
  2085.     ROM_LOAD( "03",           0x2000, 0x1000, 0x15077a9d )
  2086.     ROM_LOAD( "04",           0x3000, 0x1000, 0xa8b4bf0f )
  2087.     ROM_LOAD( "05",           0x4000, 0x1000, 0x2d306074 )
  2088.     ROM_LOAD( "06",           0x5000, 0x1000, 0x53598dde )
  2089.     ROM_LOAD( "07",           0x6000, 0x1000, 0x23606060 )
  2090.     ROM_LOAD( "08",           0x7000, 0x1000, 0x4ec490c7 )
  2091.     ROM_LOAD( "09",           0x8000, 0x1000, 0x88187b64 )
  2092.     ROM_LOAD( "10",           0xd000, 0x1000, 0x60b07ff7 )
  2093.     ROM_LOAD( "11",           0xe000, 0x1000, 0x7d2c5daf )
  2094.     ROM_LOAD( "12",           0xf000, 0x1000, 0xa0396670 )
  2095.  
  2096.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2097.     ROM_LOAD( "sg.snd",       0xf800, 0x0800, 0x2fcf6c4d )
  2098. ROM_END
  2099.  
  2100.  
  2101. ROM_START( joust )
  2102.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2103.     ROM_LOAD( "joust.wg1",    0x0000, 0x1000, 0xfe41b2af )
  2104.     ROM_LOAD( "joust.wg2",    0x1000, 0x1000, 0x501c143c )
  2105.     ROM_LOAD( "joust.wg3",    0x2000, 0x1000, 0x43f7161d )
  2106.     ROM_LOAD( "joust.wg4",    0x3000, 0x1000, 0xdb5571b6 )
  2107.     ROM_LOAD( "joust.wg5",    0x4000, 0x1000, 0xc686bb6b )
  2108.     ROM_LOAD( "joust.wg6",    0x5000, 0x1000, 0xfac5f2cf )
  2109.     ROM_LOAD( "joust.wg7",    0x6000, 0x1000, 0x81418240 )
  2110.     ROM_LOAD( "joust.wg8",    0x7000, 0x1000, 0xba5359ba )
  2111.     ROM_LOAD( "joust.wg9",    0x8000, 0x1000, 0x39643147 )
  2112.     ROM_LOAD( "joust.wga",    0xd000, 0x1000, 0x3f1c4f89 )
  2113.     ROM_LOAD( "joust.wgb",    0xe000, 0x1000, 0xea48b359 )
  2114.     ROM_LOAD( "joust.wgc",    0xf000, 0x1000, 0xc710717b )
  2115.  
  2116.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2117.     ROM_LOAD( "joust.snd",    0xf000, 0x1000, 0xf1835bdd )
  2118. ROM_END
  2119.  
  2120.  
  2121. ROM_START( joustwr )
  2122.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2123.     ROM_LOAD( "joust.wg1",    0x0000, 0x1000, 0xfe41b2af )
  2124.     ROM_LOAD( "joust.wg2",    0x1000, 0x1000, 0x501c143c )
  2125.     ROM_LOAD( "joust.wg3",    0x2000, 0x1000, 0x43f7161d )
  2126.     ROM_LOAD( "joust.wg4",    0x3000, 0x1000, 0xdb5571b6 )
  2127.     ROM_LOAD( "joust.wg5",    0x4000, 0x1000, 0xc686bb6b )
  2128.     ROM_LOAD( "joust.wg6",    0x5000, 0x1000, 0xfac5f2cf )
  2129.     ROM_LOAD( "joust.wr7",    0x6000, 0x1000, 0xe6f439c4 )
  2130.     ROM_LOAD( "joust.wg8",    0x7000, 0x1000, 0xba5359ba )
  2131.     ROM_LOAD( "joust.wg9",    0x8000, 0x1000, 0x39643147 )
  2132.     ROM_LOAD( "joust.wra",    0xd000, 0x1000, 0x2039014a )
  2133.     ROM_LOAD( "joust.wgb",    0xe000, 0x1000, 0xea48b359 )
  2134.     ROM_LOAD( "joust.wgc",    0xf000, 0x1000, 0xc710717b )
  2135.  
  2136.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2137.     ROM_LOAD( "joust.snd",    0xf000, 0x1000, 0xf1835bdd )
  2138. ROM_END
  2139.  
  2140.  
  2141. ROM_START( joustr )
  2142.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2143.     ROM_LOAD( "joust.wg1",    0x0000, 0x1000, 0xfe41b2af )
  2144.     ROM_LOAD( "joust.wg2",    0x1000, 0x1000, 0x501c143c )
  2145.     ROM_LOAD( "joust.wg3",    0x2000, 0x1000, 0x43f7161d )
  2146.     ROM_LOAD( "joust.sr4",    0x3000, 0x1000, 0xab347170 )
  2147.     ROM_LOAD( "joust.wg5",    0x4000, 0x1000, 0xc686bb6b )
  2148.     ROM_LOAD( "joust.sr6",    0x5000, 0x1000, 0x3d9a6fac )
  2149.     ROM_LOAD( "joust.sr7",    0x6000, 0x1000, 0x0a70b3d1 )
  2150.     ROM_LOAD( "joust.sr8",    0x7000, 0x1000, 0xa7f01504 )
  2151.     ROM_LOAD( "joust.sr9",    0x8000, 0x1000, 0x978687ad )
  2152.     ROM_LOAD( "joust.sra",    0xd000, 0x1000, 0xc0c6e52a )
  2153.     ROM_LOAD( "joust.srb",    0xe000, 0x1000, 0xab11bcf9 )
  2154.     ROM_LOAD( "joust.src",    0xf000, 0x1000, 0xea14574b )
  2155.  
  2156.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2157.     ROM_LOAD( "joust.snd",    0xf000, 0x1000, 0xf1835bdd )
  2158. ROM_END
  2159.  
  2160.  
  2161. ROM_START( robotron )
  2162.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2163.     ROM_LOAD( "robotron.sb1", 0x0000, 0x1000, 0x66c7d3ef )
  2164.     ROM_LOAD( "robotron.sb2", 0x1000, 0x1000, 0x5bc6c614 )
  2165.     ROM_LOAD( "robotron.sb3", 0x2000, 0x1000, 0xe99a82be )
  2166.     ROM_LOAD( "robotron.sb4", 0x3000, 0x1000, 0xafb1c561 )
  2167.     ROM_LOAD( "robotron.sb5", 0x4000, 0x1000, 0x62691e77 )
  2168.     ROM_LOAD( "robotron.sb6", 0x5000, 0x1000, 0xbd2c853d )
  2169.     ROM_LOAD( "robotron.sb7", 0x6000, 0x1000, 0x49ac400c )
  2170.     ROM_LOAD( "robotron.sb8", 0x7000, 0x1000, 0x3a96e88c )
  2171.     ROM_LOAD( "robotron.sb9", 0x8000, 0x1000, 0xb124367b )
  2172.     ROM_LOAD( "robotron.sba", 0xd000, 0x1000, 0x13797024 )
  2173.     ROM_LOAD( "robotron.sbb", 0xe000, 0x1000, 0x7e3c1b87 )
  2174.     ROM_LOAD( "robotron.sbc", 0xf000, 0x1000, 0x645d543e )
  2175.  
  2176.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2177.     ROM_LOAD( "robotron.snd", 0xf000, 0x1000, 0xc56c1d28 )
  2178. ROM_END
  2179.  
  2180.  
  2181. ROM_START( robotryo )
  2182.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2183.     ROM_LOAD( "robotron.sb1", 0x0000, 0x1000, 0x66c7d3ef )
  2184.     ROM_LOAD( "robotron.sb2", 0x1000, 0x1000, 0x5bc6c614 )
  2185.     ROM_LOAD( "robotron.yo3", 0x2000, 0x1000, 0x67a369bc )
  2186.     ROM_LOAD( "robotron.yo4", 0x3000, 0x1000, 0xb0de677a )
  2187.     ROM_LOAD( "robotron.yo5", 0x4000, 0x1000, 0x24726007 )
  2188.     ROM_LOAD( "robotron.yo6", 0x5000, 0x1000, 0x028181a6 )
  2189.     ROM_LOAD( "robotron.yo7", 0x6000, 0x1000, 0x4dfcceae )
  2190.     ROM_LOAD( "robotron.sb8", 0x7000, 0x1000, 0x3a96e88c )
  2191.     ROM_LOAD( "robotron.sb9", 0x8000, 0x1000, 0xb124367b )
  2192.     ROM_LOAD( "robotron.yoa", 0xd000, 0x1000, 0x4a9d5f52 )
  2193.     ROM_LOAD( "robotron.yob", 0xe000, 0x1000, 0x2afc5e7f )
  2194.     ROM_LOAD( "robotron.yoc", 0xf000, 0x1000, 0x45da9202 )
  2195.  
  2196.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2197.     ROM_LOAD( "robotron.snd", 0xf000, 0x1000, 0xc56c1d28 )
  2198. ROM_END
  2199.  
  2200.  
  2201. ROM_START( bubbles )
  2202.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2203.     ROM_LOAD( "bubbles.1b",   0x0000, 0x1000, 0x8234f55c )
  2204.     ROM_LOAD( "bubbles.2b",   0x1000, 0x1000, 0x4a188d6a )
  2205.     ROM_LOAD( "bubbles.3b",   0x2000, 0x1000, 0x7728f07f )
  2206.     ROM_LOAD( "bubbles.4b",   0x3000, 0x1000, 0x040be7f9 )
  2207.     ROM_LOAD( "bubbles.5b",   0x4000, 0x1000, 0x0b5f29e0 )
  2208.     ROM_LOAD( "bubbles.6b",   0x5000, 0x1000, 0x4dd0450d )
  2209.     ROM_LOAD( "bubbles.7b",   0x6000, 0x1000, 0xe0a26ec0 )
  2210.     ROM_LOAD( "bubbles.8b",   0x7000, 0x1000, 0x4fd23d8d )
  2211.     ROM_LOAD( "bubbles.9b",   0x8000, 0x1000, 0xb48559fb )
  2212.     ROM_LOAD( "bubbles.10b",  0xd000, 0x1000, 0x26e7869b )
  2213.     ROM_LOAD( "bubbles.11b",  0xe000, 0x1000, 0x5a5b572f )
  2214.     ROM_LOAD( "bubbles.12b",  0xf000, 0x1000, 0xce22d2e2 )
  2215.  
  2216.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2217.     ROM_LOAD( "bubbles.snd",  0xf000, 0x1000, 0x689ce2aa )
  2218. ROM_END
  2219.  
  2220.  
  2221. ROM_START( bubblesr )
  2222.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2223.     ROM_LOAD( "bubblesr.1b",  0x0000, 0x1000, 0xdda4e782 )
  2224.     ROM_LOAD( "bubblesr.2b",  0x1000, 0x1000, 0x3c8fa7f5 )
  2225.     ROM_LOAD( "bubblesr.3b",  0x2000, 0x1000, 0xf869bb9c )
  2226.     ROM_LOAD( "bubblesr.4b",  0x3000, 0x1000, 0x0c65eaab )
  2227.     ROM_LOAD( "bubblesr.5b",  0x4000, 0x1000, 0x7ece4e13 )
  2228.     ROM_LOAD( "bubbles.6b",   0x5000, 0x1000, 0x4dd0450d )
  2229.     ROM_LOAD( "bubbles.7b",   0x6000, 0x1000, 0xe0a26ec0 )
  2230.     ROM_LOAD( "bubblesr.8b",  0x7000, 0x1000, 0x598b9bd6 )
  2231.     ROM_LOAD( "bubbles.9b",   0x8000, 0x1000, 0xb48559fb )
  2232.     ROM_LOAD( "bubblesr.10b", 0xd000, 0x1000, 0x8b396db0 )
  2233.     ROM_LOAD( "bubblesr.11b", 0xe000, 0x1000, 0x096af43e )
  2234.     ROM_LOAD( "bubblesr.12b", 0xf000, 0x1000, 0x5c1244ef )
  2235.  
  2236.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2237.     ROM_LOAD( "bubbles.snd",  0xf000, 0x1000, 0x689ce2aa )
  2238. ROM_END
  2239.  
  2240.  
  2241. ROM_START( splat )
  2242.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2243.     ROM_LOAD( "splat.01",     0x0000, 0x1000, 0x1cf26e48 )
  2244.     ROM_LOAD( "splat.02",     0x1000, 0x1000, 0xac0d4276 )
  2245.     ROM_LOAD( "splat.03",     0x2000, 0x1000, 0x74873e59 )
  2246.     ROM_LOAD( "splat.04",     0x3000, 0x1000, 0x70a7064e )
  2247.     ROM_LOAD( "splat.05",     0x4000, 0x1000, 0xc6895221 )
  2248.     ROM_LOAD( "splat.06",     0x5000, 0x1000, 0xea4ab7fd )
  2249.     ROM_LOAD( "splat.07",     0x6000, 0x1000, 0x82fd8713 )
  2250.     ROM_LOAD( "splat.08",     0x7000, 0x1000, 0x7dded1b4 )
  2251.     ROM_LOAD( "splat.09",     0x8000, 0x1000, 0x71cbfe5a )
  2252.     ROM_LOAD( "splat.10",     0xd000, 0x1000, 0xd1a1f632 )
  2253.     ROM_LOAD( "splat.11",     0xe000, 0x1000, 0xca8cde95 )
  2254.     ROM_LOAD( "splat.12",     0xf000, 0x1000, 0x5bee3e60 )
  2255.  
  2256.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2257.     ROM_LOAD( "splat.snd",    0xf000, 0x1000, 0xa878d5f3 )
  2258. ROM_END
  2259.  
  2260.  
  2261. ROM_START( sinistar )
  2262.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2263.     ROM_LOAD( "sinistar.01",  0x0000, 0x1000, 0xf6f3a22c )
  2264.     ROM_LOAD( "sinistar.02",  0x1000, 0x1000, 0xcab3185c )
  2265.     ROM_LOAD( "sinistar.03",  0x2000, 0x1000, 0x1ce1b3cc )
  2266.     ROM_LOAD( "sinistar.04",  0x3000, 0x1000, 0x6da632ba )
  2267.     ROM_LOAD( "sinistar.05",  0x4000, 0x1000, 0xb662e8fc )
  2268.     ROM_LOAD( "sinistar.06",  0x5000, 0x1000, 0x2306183d )
  2269.     ROM_LOAD( "sinistar.07",  0x6000, 0x1000, 0xe5dd918e )
  2270.     ROM_LOAD( "sinistar.08",  0x7000, 0x1000, 0x4785a787 )
  2271.     ROM_LOAD( "sinistar.09",  0x8000, 0x1000, 0x50cb63ad )
  2272.     ROM_LOAD( "sinistar.10",  0xe000, 0x1000, 0x3d670417 )
  2273.     ROM_LOAD( "sinistar.11",  0xf000, 0x1000, 0x3162bc50 )
  2274.  
  2275.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2276.     ROM_LOAD( "speech.ic7",   0xb000, 0x1000, 0xe1019568 )
  2277.     ROM_LOAD( "speech.ic5",   0xc000, 0x1000, 0xcf3b5ffd )
  2278.     ROM_LOAD( "speech.ic6",   0xd000, 0x1000, 0xff8d2645 )
  2279.     ROM_LOAD( "speech.ic4",   0xe000, 0x1000, 0x4b56a626 )
  2280.     ROM_LOAD( "sinistar.snd", 0xf000, 0x1000, 0xb82f4ddb )
  2281. ROM_END
  2282.  
  2283.  
  2284. ROM_START( sinista1 )
  2285.     ROM_REGION( 0x10000, REGION_CPU1 ) /* 64k for code */
  2286.     ROM_LOAD( "sinrev1.01",   0x0000, 0x1000, 0x3810d7b8 )
  2287.     ROM_LOAD( "sinistar.02",  0x1000, 0x1000, 0xcab3185c )
  2288.     ROM_LOAD( "sinrev1.03",   0x2000, 0x1000, 0x7c984ca9 )
  2289.     ROM_LOAD( "sinrev1.04",   0x3000, 0x1000, 0xcc6c4f24 )
  2290.     ROM_LOAD( "sinrev1.05",   0x4000, 0x1000, 0x12285bfe )
  2291.     ROM_LOAD( "sinrev1.06",   0x5000, 0x1000, 0x7a675f35 )
  2292.     ROM_LOAD( "sinrev1.07",   0x6000, 0x1000, 0xb0463243 )
  2293.     ROM_LOAD( "sinrev1.08",   0x7000, 0x1000, 0x909040d4 )
  2294.     ROM_LOAD( "sinrev1.09",   0x8000, 0x1000, 0xcc949810 )
  2295.     ROM_LOAD( "sinrev1.10",   0xe000, 0x1000, 0xea87a53f )
  2296.     ROM_LOAD( "sinrev1.11",   0xf000, 0x1000, 0x88d36e80 )
  2297.  
  2298.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sound CPU */
  2299.     ROM_LOAD( "speech.ic7",   0xb000, 0x1000, 0xe1019568 )
  2300.     ROM_LOAD( "speech.ic5",   0xc000, 0x1000, 0xcf3b5ffd )
  2301.     ROM_LOAD( "speech.ic6",   0xd000, 0x1000, 0xff8d2645 )
  2302.     ROM_LOAD( "speech.ic4",   0xe000, 0x1000, 0x4b56a626 )
  2303.     ROM_LOAD( "sinistar.snd", 0xf000, 0x1000, 0xb82f4ddb )
  2304. ROM_END
  2305.  
  2306.  
  2307. ROM_START( sinista2 )
  2308.     ROM_REGION( 0x10000, REGION_CPU1 )     /* 64k for code */
  2309.     ROM_LOAD( "sinistar.01",  0x0000, 0x1000, 0xf6f3a22c )
  2310.     ROM_LOAD( "sinistar.02",  0x1000, 0x1000, 0xcab3185c )
  2311.     ROM_LOAD( "sinistar.03",  0x2000, 0x1000, 0x1ce1b3cc )
  2312.     ROM_LOAD( "sinistar.04",  0x3000, 0x1000, 0x6da632ba )
  2313.     ROM_LOAD( "sinistar.05",  0x4000, 0x1000, 0xb662e8fc )
  2314.     ROM_LOAD( "sinistar.06",  0x5000, 0x1000, 0x2306183d )
  2315.     ROM_LOAD( "sinistar.07",  0x6000, 0x1000, 0xe5dd918e )
  2316.     ROM_LOAD( "sinrev2.08",   0x7000, 0x1000, 0xd7ecee45 )
  2317.     ROM_LOAD( "sinistar.09",  0x8000, 0x1000, 0x50cb63ad )
  2318.     ROM_LOAD( "sinistar.10",  0xe000, 0x1000, 0x3d670417 )
  2319.     ROM_LOAD( "sinrev2.11",   0xf000, 0x1000, 0x792c8b00 )
  2320.  
  2321.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the sound CPU */
  2322.     ROM_LOAD( "speech.ic7",   0xb000, 0x1000, 0xe1019568 )
  2323.     ROM_LOAD( "speech.ic5",   0xc000, 0x1000, 0xcf3b5ffd )
  2324.     ROM_LOAD( "speech.ic6",   0xd000, 0x1000, 0xff8d2645 )
  2325.     ROM_LOAD( "speech.ic4",   0xe000, 0x1000, 0x4b56a626 )
  2326.     ROM_LOAD( "sinistar.snd", 0xf000, 0x1000, 0xb82f4ddb )
  2327. ROM_END
  2328.  
  2329.  
  2330. ROM_START( blaster )
  2331.     ROM_REGION( 0x3c000, REGION_CPU1 )
  2332.     ROM_LOAD( "blaster.11",   0x04000, 0x2000, 0x6371e62f )
  2333.     ROM_LOAD( "blaster.12",   0x06000, 0x2000, 0x9804faac )
  2334.     ROM_LOAD( "blaster.17",   0x08000, 0x1000, 0xbf96182f )
  2335.     ROM_LOAD( "blaster.16",   0x0d000, 0x1000, 0x54a40b21 )
  2336.     ROM_LOAD( "blaster.13",   0x0e000, 0x2000, 0xf4dae4c8 )
  2337.  
  2338.     ROM_LOAD( "blaster.15",   0x00000, 0x4000, 0x1ad146a4 )
  2339.     ROM_LOAD( "blaster.8",    0x10000, 0x4000, 0xf110bbb0 )
  2340.     ROM_LOAD( "blaster.9",    0x14000, 0x4000, 0x5c5b0f8a )
  2341.     ROM_LOAD( "blaster.10",   0x18000, 0x4000, 0xd47eb67f )
  2342.     ROM_LOAD( "blaster.6",    0x1c000, 0x4000, 0x47fc007e )
  2343.     ROM_LOAD( "blaster.5",    0x20000, 0x4000, 0x15c1b94d )
  2344.     ROM_LOAD( "blaster.14",   0x24000, 0x4000, 0xaea6b846 )
  2345.     ROM_LOAD( "blaster.7",    0x28000, 0x4000, 0x7a101181 )
  2346.     ROM_LOAD( "blaster.1",    0x2c000, 0x4000, 0x8d0ea9e7 )
  2347.     ROM_LOAD( "blaster.2",    0x30000, 0x4000, 0x03c4012c )
  2348.     ROM_LOAD( "blaster.4",    0x34000, 0x4000, 0xfc9d39fb )
  2349.     ROM_LOAD( "blaster.3",    0x38000, 0x4000, 0x253690fb )
  2350.  
  2351.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the sound CPU */
  2352.     ROM_LOAD( "blaster.18",   0xf000, 0x1000, 0xc33a3145 )
  2353.  
  2354.     ROM_REGION( 0x0800, REGION_PROMS )        /* color PROM data */
  2355.     ROM_LOAD( "blaster.col",  0x0000, 0x0800, 0xbac50bc4 )
  2356. ROM_END
  2357.  
  2358.  
  2359. ROM_START( tshoot )
  2360.     ROM_REGION( 0x48000, REGION_CPU1 )
  2361.     ROM_LOAD( "rom18.cpu", 0x0D000, 0x1000, 0xeffc33f1 )    /* IC55 */
  2362.     ROM_LOAD( "rom2.cpu",  0x0E000, 0x1000, 0xfd982687 )    /* IC9    */
  2363.     ROM_LOAD( "rom3.cpu",  0x0F000, 0x1000, 0x9617054d )    /* IC10 */
  2364.  
  2365.     ROM_LOAD( "rom11.cpu", 0x10000, 0x2000, 0x60d5fab8 )    /* IC18 */
  2366.     ROM_LOAD( "rom9.cpu",  0x12000, 0x2000, 0xa4dd4a0e )    /* IC16 */
  2367.     ROM_LOAD( "rom7.cpu",  0x14000, 0x2000, 0xf25505e6 )    /* IC14 */
  2368.     ROM_LOAD( "rom5.cpu",  0x16000, 0x2000, 0x94a7c0ed )    /* IC12 */
  2369.  
  2370.     ROM_LOAD( "rom17.cpu", 0x20000, 0x2000, 0xb02d1ccd )    /* IC26 */
  2371.     ROM_LOAD( "rom15.cpu", 0x22000, 0x2000, 0x11709935 )    /* IC24 */
  2372.  
  2373.     ROM_LOAD( "rom10.cpu", 0x30000, 0x2000, 0x0f32bad8 )    /* IC17 */
  2374.     ROM_LOAD( "rom8.cpu",  0x32000, 0x2000, 0xe9b6cbf7 )    /* IC15 */
  2375.     ROM_LOAD( "rom6.cpu",  0x34000, 0x2000, 0xa49f617f )    /* IC13 */
  2376.     ROM_LOAD( "rom4.cpu",  0x36000, 0x2000, 0xb026dc00 )    /* IC11 */
  2377.  
  2378.     ROM_LOAD( "rom16.cpu", 0x40000, 0x2000, 0x69ce38f8 )    /* IC25 */
  2379.     ROM_LOAD( "rom14.cpu", 0x42000, 0x2000, 0x769a4ae5 )    /* IC23 */
  2380.     ROM_LOAD( "rom13.cpu", 0x44000, 0x2000, 0xec016c9b )    /* IC21 */
  2381.     ROM_LOAD( "rom12.cpu", 0x46000, 0x2000, 0x98ae7afa )    /* IC19 */
  2382.  
  2383.     /* sound CPU */
  2384.     ROM_REGION( 0x10000, REGION_CPU2 )
  2385.     ROM_LOAD( "rom1.cpu", 0xE000, 0x2000, 0x011a94a7 )        /* IC8    */
  2386.  
  2387.     ROM_REGION( 0xc000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2388.     ROM_LOAD( "rom20.cpu", 0x00000, 0x2000, 0xc6e1d253 )    /* IC57 */
  2389.     ROM_LOAD( "rom21.cpu", 0x04000, 0x2000, 0x9874e90f )    /* IC58 */
  2390.     ROM_LOAD( "rom19.cpu", 0x08000, 0x2000, 0xb9ce4d2a )    /* IC41 */
  2391. ROM_END
  2392.  
  2393.  
  2394. ROM_START( joust2 )
  2395.     ROM_REGION( 0x48000, REGION_CPU1 )
  2396.     ROM_LOAD( "ic55_r1.cpu", 0x0D000, 0x1000, 0x08b0d5bd )    /* IC55 ROM02 */
  2397.     ROM_LOAD( "ic09_r2.cpu", 0x0E000, 0x1000, 0x951175ce )    /* IC09 ROM03 */
  2398.     ROM_LOAD( "ic10_r2.cpu", 0x0F000, 0x1000, 0xba6e0f6c )    /* IC10 ROM04 */
  2399.  
  2400.     ROM_LOAD( "ic18_r1.cpu", 0x10000, 0x2000, 0x9dc986f9 )    /* IC18 ROM11 */
  2401.     ROM_LOAD( "ic16_r2.cpu", 0x12000, 0x2000, 0x56e2b550 )    /* IC16 ROM09 */
  2402.     ROM_LOAD( "ic14_r2.cpu", 0x14000, 0x2000, 0xf3bce576 )    /* IC14 ROM07 */
  2403.     ROM_LOAD( "ic12_r2.cpu", 0x16000, 0x2000, 0x5f8b4919 )    /* IC12 ROM05 */
  2404.  
  2405.     ROM_LOAD( "ic26_r1.cpu", 0x20000, 0x2000, 0x4ef5e805 )    /* IC26 ROM19 */
  2406.     ROM_LOAD( "ic24_r1.cpu", 0x22000, 0x2000, 0x4861f063 )    /* IC24 ROM17 */
  2407.     ROM_LOAD( "ic22_r1.cpu", 0x24000, 0x2000, 0x421aafa8 )    /* IC22 ROM15 */
  2408.     ROM_LOAD( "ic20_r1.cpu", 0x26000, 0x2000, 0x3432ff55 )    /* IC20 ROM13 */
  2409.  
  2410.     ROM_LOAD( "ic17_r1.cpu", 0x30000, 0x2000, 0x3e01b597 )    /* IC17 ROM10 */
  2411.     ROM_LOAD( "ic15_r1.cpu", 0x32000, 0x2000, 0xff26fb29 )    /* IC15 ROM08 */
  2412.     ROM_LOAD( "ic13_r2.cpu", 0x34000, 0x2000, 0x5f107db5 )    /* IC13 ROM06 */
  2413.  
  2414.     ROM_LOAD( "ic25_r1.cpu", 0x40000, 0x2000, 0x47580af5 )    /* IC25 ROM18 */
  2415.     ROM_LOAD( "ic23_r1.cpu", 0x42000, 0x2000, 0x869b5942 )    /* IC23 ROM16 */
  2416.     ROM_LOAD( "ic21_r1.cpu", 0x44000, 0x2000, 0x0bbd867c )    /* IC21 ROM14 */
  2417.     ROM_LOAD( "ic19_r1.cpu", 0x46000, 0x2000, 0xb9221ed1 )    /* IC19 ROM12 */
  2418.  
  2419.     /* sound CPU */
  2420.     ROM_REGION( 0x10000, REGION_CPU2 )
  2421.     ROM_LOAD( "ic08_r1.cpu", 0x0E000, 0x2000, 0x84517c3c )    /* IC08 ROM08 */
  2422.  
  2423.     /* sound board */
  2424.     ROM_REGION( 0x70000, REGION_CPU3 )
  2425.     ROM_LOAD( "u04_r1.snd", 0x10000, 0x8000, 0x3af6b47d )    /* IC04 ROM23 */
  2426.     ROM_LOAD( "u19_r1.snd", 0x30000, 0x8000, 0xe7f9ed2e )    /* IC19 ROM24 */
  2427.     ROM_LOAD( "u20_r1.snd", 0x50000, 0x8000, 0xc85b29f7 )    /* IC20 ROM25 */
  2428.  
  2429.     ROM_REGION( 0xc000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2430.     ROM_LOAD( "ic57_r1.vid", 0x00000, 0x4000, 0x572c6b01 )    /* IC57 ROM20 */
  2431.     ROM_LOAD( "ic58_r1.vid", 0x04000, 0x4000, 0xaa94bf05 )    /* IC58 ROM21 */
  2432.     ROM_LOAD( "ic41_r1.vid", 0x08000, 0x4000, 0xc41e3daa )    /* IC41 ROM22 */
  2433. ROM_END
  2434.  
  2435.  
  2436. ROM_START( mysticm )
  2437.     ROM_REGION( 0x48000, REGION_CPU1 )
  2438.     ROM_LOAD( "mm02_2.a09", 0x0E000, 0x1000, 0x3a776ea8 )    /* IC9    */
  2439.     ROM_LOAD( "mm03_2.a10", 0x0F000, 0x1000, 0x6e247c75 )    /* IC10 */
  2440.  
  2441.     ROM_LOAD( "mm11_1.a18", 0x10000, 0x2000, 0xf537968e )    /* IC18 */
  2442.     ROM_LOAD( "mm09_1.a16", 0x12000, 0x2000, 0x3bd12f6c )    /* IC16 */
  2443.     ROM_LOAD( "mm07_1.a14", 0x14000, 0x2000, 0xea2a2a68 )    /* IC14 */
  2444.     ROM_LOAD( "mm05_1.a12", 0x16000, 0x2000, 0xb514eef3 )    /* IC12 */
  2445.  
  2446.     ROM_LOAD( "mm18_1.a26", 0x20000, 0x2000, 0x9b391a81 )    /* IC26 */
  2447.     ROM_LOAD( "mm16_1.a24", 0x22000, 0x2000, 0x399e175d )    /* IC24 */
  2448.     ROM_LOAD( "mm14_1.a22", 0x24000, 0x2000, 0x191153b1 )    /* IC22 */
  2449.  
  2450.     ROM_LOAD( "mm10_1.a17", 0x30000, 0x2000, 0xd6a37509 )    /* IC17 */
  2451.     ROM_LOAD( "mm08_1.a15", 0x32000, 0x2000, 0x6f1a64f2 )    /* IC15 */
  2452.     ROM_LOAD( "mm06_1.a13", 0x34000, 0x2000, 0x2e6795d4 )    /* IC13 */
  2453.     ROM_LOAD( "mm04_1.a11", 0x36000, 0x2000, 0xc222fb64 )    /* IC11 */
  2454.  
  2455.     ROM_LOAD( "mm17_1.a25", 0x40000, 0x2000, 0xd36f0a96 )    /* IC25 */
  2456.     ROM_LOAD( "mm15_1.a23", 0x42000, 0x2000, 0xcd5d99da )    /* IC23 */
  2457.     ROM_LOAD( "mm13_1.a21", 0x44000, 0x2000, 0xef4b79db )    /* IC21 */
  2458.     ROM_LOAD( "mm12_1.a19", 0x46000, 0x2000, 0xa1f04bf0 )    /* IC19 */
  2459.  
  2460.     /* sound CPU */
  2461.     ROM_REGION( 0x10000, REGION_CPU2 )
  2462.     ROM_LOAD( "mm01_1.a08", 0x0E000, 0x2000, 0x65339512 )    /* IC8    */
  2463.  
  2464.     ROM_REGION( 0xc000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2465.     ROM_LOAD( "mm20_1.b57", 0x00000, 0x2000, 0x5c0f4f46 )    /* IC57 */
  2466.     ROM_LOAD( "mm21_1.b58", 0x04000, 0x2000, 0xcb90b3c5 )    /* IC58 */
  2467.     ROM_LOAD( "mm19_1.b41", 0x08000, 0x2000, 0xe274df86 )    /* IC41 */
  2468. ROM_END
  2469.  
  2470.  
  2471. ROM_START( inferno )
  2472.     ROM_REGION( 0x48000, REGION_CPU1 )
  2473.     ROM_LOAD( "ic9.inf", 0x0E000, 0x1000, 0x1a013185 )        /* IC9    */
  2474.     ROM_LOAD( "ic10.inf", 0x0F000, 0x1000, 0xdbf64a36 )     /* IC10 */
  2475.  
  2476.     ROM_LOAD( "ic18.inf", 0x10000, 0x2000, 0x95bcf7b1 )        /* IC18 */
  2477.     ROM_LOAD( "ic16.inf", 0x12000, 0x2000, 0x8bc4f935 )        /* IC16 */
  2478.     ROM_LOAD( "ic14.inf", 0x14000, 0x2000, 0xa70508a7 )        /* IC14 */
  2479.     ROM_LOAD( "ic12.inf", 0x16000, 0x2000, 0x7ffb87f9 )        /* IC12 */
  2480.  
  2481.     ROM_LOAD( "ic17.inf", 0x30000, 0x2000, 0xb4684139 )     /* IC17 */
  2482.     ROM_LOAD( "ic15.inf", 0x32000, 0x2000, 0x128a6ad6 )     /* IC15 */
  2483.     ROM_LOAD( "ic13.inf", 0x34000, 0x2000, 0x83a9e4d6 )     /* IC13 */
  2484.     ROM_LOAD( "ic11.inf", 0x36000, 0x2000, 0xc2e9c909 )     /* IC11 */
  2485.  
  2486.     ROM_LOAD( "ic25.inf", 0x40000, 0x2000, 0x103a5951 )     /* IC25 */
  2487.     ROM_LOAD( "ic23.inf", 0x42000, 0x2000, 0xc04749a0 )     /* IC23 */
  2488.     ROM_LOAD( "ic21.inf", 0x44000, 0x2000, 0xc405f853 )     /* IC21 */
  2489.     ROM_LOAD( "ic19.inf", 0x46000, 0x2000, 0xade7645a )     /* IC19 */
  2490.  
  2491.     /* sound CPU */
  2492.     ROM_REGION( 0x10000, REGION_CPU2 )
  2493.     ROM_LOAD( "ic8.inf", 0x0E000, 0x2000, 0x4e3123b8 )        /* IC8    */
  2494.  
  2495.     ROM_REGION( 0xc000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  2496.     ROM_LOAD( "ic57.inf", 0x00000, 0x2000, 0x65a4ef79 )     /* IC57 */
  2497.     ROM_LOAD( "ic58.inf", 0x04000, 0x2000, 0x4bb1c2a0 )     /* IC58 */
  2498.     ROM_LOAD( "ic41.inf", 0x08000, 0x2000, 0xf3f7238f )     /* IC41 */
  2499. ROM_END
  2500.  
  2501.  
  2502.  
  2503. /*************************************
  2504.  *
  2505.  *    Game drivers
  2506.  *
  2507.  *************************************/
  2508.  
  2509. GAME( 1980, defender, 0,        defender, defender, defender, ROT0,   "Williams", "Defender (Red label)" )
  2510. GAME( 1980, defendg,  defender, defender, defender, defender, ROT0,   "Williams", "Defender (Green label)" )
  2511. GAME( 1980, defendw,  defender, defender, defender, defender, ROT0,   "Williams", "Defender (White label)" )
  2512. GAMEX(1980, defndjeu, defender, defender, defender, defndjeu, ROT0,   "Jeutel", "Defender ? (bootleg)", GAME_NOT_WORKING )
  2513. GAME( 1980, defcmnd,  defender, defender, defender, defender, ROT0,   "bootleg", "Defense Command (set 1)" )
  2514. GAMEX(1980, defcomnd, defender, defender, defender, defender, ROT0,   "<unknown>", "Defense Command (set 2)", GAME_NOT_WORKING )
  2515. GAME( 1981, defence,  defender, defender, defender, defender, ROT0,   "Outer Limits", "Defence Command" )
  2516.  
  2517. GAME( 1980, mayday,   0,        defender, defender, mayday,   ROT0,   "<unknown>", "Mayday (set 1)" )
  2518. GAME( 1980, maydaya,  mayday,   defender, defender, mayday,   ROT0,   "<unknown>", "Mayday (set 2)" )
  2519.  
  2520. GAME( 1981, colony7,  0,        defender, colony7,  colony7,  ROT270, "Taito", "Colony 7 (set 1)" )
  2521. GAME( 1981, colony7a, colony7,  defender, colony7,  colony7,  ROT270, "Taito", "Colony 7 (set 2)" )
  2522.  
  2523. GAME( 1981, stargate, 0,        williams, stargate, stargate, ROT0,   "Williams", "Stargate" )
  2524.  
  2525. GAME( 1982, robotron, 0,        williams, robotron, robotron, ROT0,   "Williams", "Robotron (Solid Blue label)" )
  2526. GAME( 1982, robotryo, robotron, williams, robotron, robotron, ROT0,   "Williams", "Robotron (Yellow/Orange label)" )
  2527.  
  2528. GAME( 1982, joust,    0,        williams, joust,    joust,    ROT0,   "Williams", "Joust (White/Green label)" )
  2529. GAME( 1982, joustr,   joust,    williams, joust,    joust,    ROT0,   "Williams", "Joust (Solid Red label)" )
  2530. GAME( 1982, joustwr,  joust,    williams, joust,    joust,    ROT0,   "Williams", "Joust (White/Red label)" )
  2531.  
  2532. GAME( 1982, bubbles,  0,        williams, bubbles,  bubbles,  ROT0,   "Williams", "Bubbles" )
  2533. GAME( 1982, bubblesr, bubbles,  williams, bubbles,  bubbles,  ROT0,   "Williams", "Bubbles (Solid Red label)" )
  2534.  
  2535. GAME( 1982, splat,    0,        williams, splat,    splat,    ROT0,   "Williams", "Splat!" )
  2536.  
  2537. GAME( 1982, sinistar, 0,        sinistar, sinistar, sinistar, ROT270, "Williams", "Sinistar (revision 3)" )
  2538. GAME( 1982, sinista1, sinistar, sinistar, sinistar, sinistar, ROT270, "Williams", "Sinistar (prototype version)" )
  2539. GAME( 1982, sinista2, sinistar, sinistar, sinistar, sinistar, ROT270, "Williams", "Sinistar (revision 2)" )
  2540.  
  2541. GAME( 1983, blaster,  0,        blaster,  blaster,  blaster,  ROT0,   "Williams", "Blaster" )
  2542.  
  2543. GAME( 1983, mysticm,  0,        williams2,mysticm,  mysticm,  ROT0,   "Williams", "Mystic Marathon" )
  2544. GAME( 1984, tshoot,   0,        williams2,tshoot,   tshoot,   ROT0,   "Williams", "Turkey Shoot" )
  2545. GAMEX(1984, inferno,  0,        williams2,inferno,  inferno,  ROT0,   "Williams", "Inferno", GAME_IMPERFECT_SOUND )
  2546. GAME( 1986, joust2,   0,        joust2,   joust2,   joust2,   ROT270, "Williams", "Joust 2 - Survival of the Fittest (set 1)" )
  2547.